Skip to main content
Tool call patterns

MCP Reference

Tool call patterns

Practical MCP request shapes for generation, recovery, and model selection.

AgentFramer works best when the assistant chooses the smallest tool sequence that answers the user request. Prefer direct generation calls for new work, and use history lookups when the task may already be complete.

Avoid multi-step chains unless the result of one tool call changes the next decision. That keeps latency low and reduces duplicate media jobs.

One-shot generation

agent.call_tool("agentframer", {
  action: "generate_image",
  prompt: "Editorial product shot on brushed steel"
})

Use for simple media requests where the agent can submit a prompt and wait for a stored output URL in a single step.

Model override

agent.call_tool("agentframer", {
  action: "generate_video",
  model: "klingai-video-3.0-pro",
  prompt: "10 second camera orbit around a sneaker"
})

Override the default model only when the prompt needs a specific provider capability, format, or quality profile.

Recovering previous output

agent.call_tool("agentframer", {
  action: "list_recent_generations"
})

agent.call_tool("agentframer", {
  action: "get_generation",
  generationId: "<id>"
})

Ask for recent generations before retrying work. This prevents duplicate jobs when the assistant reconnects or loses local state.

When an assistant needs a full list of available actions or parameter names, use the MCP tools reference. Use this page as guidance for when to chain those actions together.