Recommend Model
Immutable Catalog Entry
This descriptor comes from the active versioned Portal catalog.
- Contract tier:
agent_ready - Risk:
read - Catalog version:
leonardo-ai-2026.07.12.1 - Descriptor hash:
8ba25aca78f9915b9c1c1e7212529be6481a206d1446017c005ee066c8aa9730
Recommend a Leonardo model and default request body additions for a media goal. Runs locally and does not contact Leonardo.Ai.
Request Body
{
"jsonrpc": "2.0",
"id": "leonardo-ai-leonardo-recommend-model-example",
"method": "tools/call",
"params": {
"name": "leonardo-ai.leonardo_recommend_model",
"arguments": {
"goal": "",
"model": "",
"prompt": "",
"use_case": "use_case_example",
"model_name": "",
"target_medium": ""
}
}
}
Arguments Schema
{
"type": "object",
"properties": {
"goal": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Alias for prompt/use_case when an agent describes the desired output."
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional requested model name or provider identifier."
},
"prompt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional prompt text for heuristic routing."
},
"use_case": {
"type": "string",
"default": "general",
"description": "One of general, photorealistic, text, character, fast, video, or a free-form goal."
},
"model_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional human-readable requested model name."
},
"target_medium": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional medium context such as wallpaper, poster, or product shot."
}
},
"additionalProperties": false
}
Output Schema
{
"type": "object",
"description": "Leonardo MCP result. ok=false, provider_ok=false, a failed status, or an error field represents a semantic failure even when transport delivery succeeded.",
"additionalProperties": true
}
Code Examples
- cURL
- Node.js
- Python
curl -X POST 'https://portal.madpanda3d.com/api/mcp' \
-H 'Authorization: Bearer mad_live_***' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": "leonardo-ai-leonardo-recommend-model-example",
"method": "tools/call",
"params": {
"name": "leonardo-ai.leonardo_recommend_model",
"arguments": {
"goal": "",
"model": "",
"prompt": "",
"use_case": "use_case_example",
"model_name": "",
"target_medium": ""
}
}
}'
const response = await fetch('https://portal.madpanda3d.com/api/mcp', {
method: 'POST',
headers: {
Authorization: 'Bearer mad_live_***',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"jsonrpc": "2.0",
"id": "leonardo-ai-leonardo-recommend-model-example",
"method": "tools/call",
"params": {
"name": "leonardo-ai.leonardo_recommend_model",
"arguments": {
"goal": "",
"model": "",
"prompt": "",
"use_case": "use_case_example",
"model_name": "",
"target_medium": ""
}
}
}),
});
const data = await response.json();
console.log(data);
import requests
url = 'https://portal.madpanda3d.com/api/mcp'
headers = {
'Authorization': 'Bearer mad_live_***',
'Content-Type': 'application/json',
}
payload = {
"jsonrpc": "2.0",
"id": "leonardo-ai-leonardo-recommend-model-example",
"method": "tools/call",
"params": {
"name": "leonardo-ai.leonardo_recommend_model",
"arguments": {
"goal": "",
"model": "",
"prompt": "",
"use_case": "use_case_example",
"model_name": "",
"target_medium": ""
}
}
}
response = requests.post(url, headers=headers, json=payload, timeout=60)
print(response.json())
Example Responses
- 200 Success
- 502 Upstream Error
{
"ok": true,
"message": "Tool leonardo-ai.leonardo_recommend_model executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}
{
"ok": false,
"classification": "upstream_http_error",
"message": "Upstream MCP returned a non-success status."
}