Skip to main content

Improve Prompt For Generation

Immutable Catalog Entry

This descriptor comes from the active versioned Portal catalog.

WRITEleonardo-ai.leonardo_improve_prompt_for_generation
  • Contract tier: agent_ready
  • Risk: write
  • Catalog version: leonardo-ai-2026.07.12.1
  • Descriptor hash: 01c609c85d77c2a5d4631b6a75421ab97488a51fe6f5e886e37bf33f1e7da13d

Use this for short draft prompts; calls Leonardo prompt/improve. Requires the request-scoped x-leonardo-api-key Portal field and contacts Leonardo.Ai.

Request Body

{
"jsonrpc": "2.0",
"id": "leonardo-ai-leonardo-improve-prompt-for-generation-example",
"method": "tools/call",
"params": {
"name": "leonardo-ai.leonardo_improve_prompt_for_generation",
"arguments": {
"prompt": "prompt_example",
"is_video": false,
"prompt_instructions": ""
}
}
}

Arguments Schema

{
"type": "object",
"required": [
"prompt"
],
"properties": {
"prompt": {
"type": "string",
"description": "Prompt to improve for generation."
},
"is_video": {
"type": "boolean",
"default": false,
"description": "Set true when improving the prompt for a video generation."
},
"prompt_instructions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional instructions for how Leonardo should improve the prompt, such as cinematic, product photography, or concise video motion."
}
},
"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 -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-improve-prompt-for-generation-example",
"method": "tools/call",
"params": {
"name": "leonardo-ai.leonardo_improve_prompt_for_generation",
"arguments": {
"prompt": "prompt_example",
"is_video": false,
"prompt_instructions": ""
}
}
}'

Example Responses

{
"ok": true,
"message": "Tool leonardo-ai.leonardo_improve_prompt_for_generation executed successfully.",
"note": "Response shape varies by MCP tool. Inspect live responses for exact fields."
}