structuredContent.schema
when responseschema is used, {valid, attempts, error?}; jsonparseerror when JSON output could not be recovered
How to use it
structuredContent.schema is exposed by the Deepseek MCP Server MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the structuredContent.schema tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Deepseek MCP Server
claude mcp add -s user deepseek npx @arikusi/deepseek-mcp-server -e DEEPSEEK_API_KEY=your-key-hereOther tools in Deepseek MCP Server (24)
(required): "list" "clear" "delete"
Message text
Chat with DeepSeek AI models with automatic cost tracking and function calling support.
Fill-in-the-Middle completion. You give a prompt (the prefix) and an optional suffix, and the model completes the text in between. It is built for code completion and content infilling rather than conversation. FIM runs on DeepSeek's Beta endpoint in non-thinking mode, and the API caps output at 409
Manage conversation sessions.
(optional): Enable JSON output mode (supported by both models)
(optional): Maximum tokens to generate (V4 models support up to 384000)
(required): Array of conversation messages
(optional): "deepseek-v4-flash" (default) or "deepseek-v4-pro". The deprecated "deepseek-chat" and "deepseek-reasoner" aliases are still accepted and resolve to v4-flash (non-thinking / thinking); prefer the V4 names.
(required): The prefix text before the gap. For code completion, this is the code up to the cursor.
(optional): "high" (default) or "max", applies only while thinking mode is active
(optional): A JSON Schema to validate the model output against. Implies JSON output. The server validates the parsed result and, on failure, issues up to RESPONSESCHEMAMAXRETRIES repair retries (default 2, set 0 to disable) that feed the validation error back to the model. Schema regex patterns are
"system" "user" "assistant" "tool"
(optional): Session ID for multi-turn conversations. Previous context is automatically prepended.
(optional): A stop string or an array of up to 16 stop strings.
(optional): Enable streaming mode (default: false)
and fallback: what was actually sent after alias/thinking resolution, and any silent model fallback that fired
a self-contained per-request usage and cost summary (token counts, cache hit/miss, costusd), aggregated across any repair retries
(optional): The text after the gap. The model fills the space between prompt and suffix.
(optional): 0-2, controls randomness (default: 1.0). Ignored when thinking mode is enabled.
(optional): Toggle thinking mode, {type: "enabled"} to reason or {type: "disabled"} for a fast answer (non-thinking is the default)
(optional): Required for tool role messages
(optional): "auto" "none" "required" {type: "function", function: {name: "..."}}
(optional): Array of tool definitions for function calling (max 128)