Skip to main content
Glama
arikusi

Deepseek MCP Server

by arikusi

DeepSeek Chat Completion

deepseek_chat

Send multi-turn chat requests to DeepSeek models with function calling, thinking mode, JSON output, and session-based context for building AI assistants.

Instructions

Chat with DeepSeek models. deepseek-flash (V4.1 Flash, fast and economical) and deepseek-v4-pro (V4 Pro), both 1M context with optional chain-of-thought thinking mode. deepseek-v4-flash, deepseek-chat and deepseek-reasoner are legacy names, still accepted for backward compatibility (they resolve to deepseek-flash); prefer deepseek-flash. Features: multi-turn sessions (session_id), function calling (tools parameter), thinking mode, JSON output mode, multimodal input (when enabled), automatic cost tracking, and model fallback with circuit breaker resilience.

Input Schema

NameRequiredDescriptionDefault
modelNoModel to use. deepseek-flash (default, V4.1 Flash, fast/economical) or deepseek-v4-pro (V4 Pro), both 1M context, up to 384K output. Non-thinking by default for speed; pass thinking:{type:"enabled"} to reason. Legacy names (still accepted, prefer deepseek-flash): deepseek-v4-flash -> deepseek-flash, deepseek-chat -> deepseek-flash non-thinking, deepseek-reasoner -> deepseek-flash thinking.deepseek-flash
toolsNoArray of tool definitions for function calling. Each tool has type "function" and a function object with name, description, and parameters (JSON Schema).
streamNoEnable streaming mode. Returns full response after streaming completes.
messagesYesArray of conversation messages. Each message has role (system/user/assistant/tool) and content (string or array of content parts for multimodal). Tool messages require tool_call_id.
thinkingNoToggle chain-of-thought thinking mode. Use {type: "enabled"} to reason, {type: "disabled"} for a fast direct answer (the default here). When enabled, temperature/top_p are ignored.
json_modeNoEnable JSON output mode. The model will output valid JSON. Include the word "json" in your prompt for best results. Supported by both models.
max_tokensNoMaximum tokens to generate. V4 models support up to 384000 output tokens.
session_idNoSession ID for multi-turn conversations. When provided, previous messages from this session are prepended to the current messages. If the session does not exist, it is created automatically. Omit for stateless single-turn requests.
temperatureNoSampling temperature (0-2). Higher = more random. Default: 1.0. Ignored when thinking mode is enabled.
tool_choiceNoControls which tool the model calls. "auto" (default), "none", "required", or {type:"function",function:{name:"..."}}
response_schemaNoJSON Schema to validate the model output against. Implies JSON output mode. The server validates the parsed result and, on failure, issues up to RESPONSE_SCHEMA_MAX_RETRIES repair retries (feeding the validation error back). The returned content is the first schema-valid object, or the last attempt with schema.valid=false and schema.error set.
reasoning_effortNoReasoning effort while thinking mode is active: "high" (default) or "max". Only applies when thinking is enabled.

Output Schema

NameRequiredDescriptionDefault
modelYes
usageYes
schemaNo
contentYes
requestYes
cost_usdNo
fallbackNo
effectiveNo
session_idNo
tool_callsNo
routed_fromNo
finish_reasonYes
json_parse_errorNo
reasoning_contentNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.4.0
    • changedInput schema / properties / model / default
      Previous value: -"deepseek-v4-flash"New value: +"deepseek-flash"
    • changedInput schema / properties / model / description
      Previous value: -"Model to use. deepseek-v4-flash (default, fast/economical) or deepseek-v4-pro (most capable), both 1M context, up to 384K output. Non-thinking by default for speed; pass thinking:{type:\"enabled\"} to reason. Deprecated aliases (still accepted, prefer v4 names): deepseek-chat -> v4-flash non-thinking, deepseek-reasoner -> v4-flash thinking."New value: +"Model to use. deepseek-flash (default, V4.1 Flash, fast/economical) or deepseek-v4-pro (V4 Pro), both 1M context, up to 384K output. Non-thinking by default for speed; pass thinking:{type:\"enabled\"} to reason. Legacy names (still accepted, prefer deepseek-flash): deepseek-v4-flash -> deepseek-flash, deepseek-chat -> deepseek-flash non-thinking, deepseek-reasoner -> deepseek-flash thinking."
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "deepseek-v4-flash",
      -  "deepseek-v4-pro",
      -  "deepseek-chat",
      -  "deepseek-reasoner"
      -]New value: +[
      +  "deepseek-flash",
      +  "deepseek-v4-pro",
      +  "deepseek-v4-flash",
      +  "deepseek-chat",
      +  "deepseek-reasoner"
      +]
    • addedOutput schema / properties / request / properties / pricing_tier
      Added value: +{
      +  "enum": [
      +    "peak",
      +    "off-peak"
      +  ],
      +  "type": "string"
      +}
  2. Changed8 schema fields changedv2.3.0
    • changedInput schema / properties / model / description
      Previous value: -"Model to use. deepseek-v4-flash (default, fast/economical) or deepseek-v4-pro (most capable), both 1M context, up to 384K output. Non-thinking by default for speed; pass thinking:{type:\"enabled\"} to reason. Aliases: deepseek-chat -> v4-flash non-thinking, deepseek-reasoner -> v4-flash thinking."New value: +"Model to use. deepseek-v4-flash (default, fast/economical) or deepseek-v4-pro (most capable), both 1M context, up to 384K output. Non-thinking by default for speed; pass thinking:{type:\"enabled\"} to reason. Deprecated aliases (still accepted, prefer v4 names): deepseek-chat -> v4-flash non-thinking, deepseek-reasoner -> v4-flash thinking."
    • addedInput schema / properties / response_schema
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "JSON Schema to validate the model output against. Implies JSON output mode. The server validates the parsed result and, on failure, issues up to RESPONSE_SCHEMA_MAX_RETRIES repair retries (feeding the validation error back). The returned content is the first schema-valid object, or the last attempt with schema.valid=false and schema.error set.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / effective
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "model": {
      +      "type": "string"
      +    },
      +    "temperature": {
      +      "type": "number"
      +    },
      +    "thinking": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "model",
      +    "thinking"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / fallback
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "fallbackModel": {
      +      "type": "string"
      +    },
      +    "originalModel": {
      +      "type": "string"
      +    },
      +    "reason": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "originalModel",
      +    "fallbackModel",
      +    "reason"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / json_parse_error
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / request
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "cache_hit_tokens": {
      +      "type": "number"
      +    },
      +    "cache_miss_tokens": {
      +      "type": "number"
      +    },
      +    "completion_tokens": {
      +      "type": "number"
      +    },
      +    "cost_usd": {
      +      "type": "number"
      +    },
      +    "fallback_used": {
      +      "type": "boolean"
      +    },
      +    "finish_reason": {
      +      "type": "string"
      +    },
      +    "model": {
      +      "type": "string"
      +    },
      +    "prompt_tokens": {
      +      "type": "number"
      +    },
      +    "temperature": {
      +      "type": "number"
      +    },
      +    "thinking": {
      +      "type": "boolean"
      +    },
      +    "total_tokens": {
      +      "type": "number"
      +    },
      +    "wire_model": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "model",
      +    "wire_model",
      +    "thinking",
      +    "fallback_used",
      +    "finish_reason",
      +    "prompt_tokens",
      +    "completion_tokens",
      +    "total_tokens",
      +    "cache_hit_tokens",
      +    "cache_miss_tokens",
      +    "cost_usd"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / schema
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "attempts": {
      +      "type": "number"
      +    },
      +    "error": {
      +      "type": "string"
      +    },
      +    "valid": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "valid",
      +    "attempts"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "content",
      -  "model",
      -  "usage",
      -  "finish_reason"
      -]New value: +[
      +  "content",
      +  "model",
      +  "usage",
      +  "request",
      +  "finish_reason"
      +]
  3. Changed9 schema fields changedv2.0.0
    • changedInput schema / properties / max_tokens / description
      Previous value: -"Maximum tokens to generate. deepseek-chat: max 8192, deepseek-reasoner: max 65536"New value: +"Maximum tokens to generate. V4 models support up to 384000 output tokens."
    • changedInput schema / properties / max_tokens / maximum
      Previous value: -65536New value: +384000
    • changedInput schema / properties / model / default
      Previous value: -"deepseek-chat"New value: +"deepseek-v4-flash"
    • changedInput schema / properties / model / description
      Previous value: -"Model to use. Both run DeepSeek V3.2 (128K context). deepseek-chat: non-thinking mode (max 8K output), deepseek-reasoner: thinking mode (max 64K output)"New value: +"Model to use. deepseek-v4-flash (default, fast/economical) or deepseek-v4-pro (most capable), both 1M context, up to 384K output. Non-thinking by default for speed; pass thinking:{type:\"enabled\"} to reason. Aliases: deepseek-chat -> v4-flash non-thinking, deepseek-reasoner -> v4-flash thinking."
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "deepseek-chat",
      -  "deepseek-reasoner"
      -]New value: +[
      +  "deepseek-v4-flash",
      +  "deepseek-v4-pro",
      +  "deepseek-chat",
      +  "deepseek-reasoner"
      +]
    • addedInput schema / properties / reasoning_effort
      Added value: +{
      +  "description": "Reasoning effort while thinking mode is active: \"high\" (default) or \"max\". Only applies when thinking is enabled.",
      +  "enum": [
      +    "high",
      +    "max"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / thinking / description
      Previous value: -"Enable thinking mode. When enabled, temperature/top_p/frequency_penalty/presence_penalty are automatically ignored. Use {type: \"enabled\"} to activate."New value: +"Toggle chain-of-thought thinking mode. Use {type: \"enabled\"} to reason, {type: \"disabled\"} for a fast direct answer (the default here). When enabled, temperature/top_p are ignored."
    • addedOutput schema / properties / cost_usd
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / routed_from
      Added value: +{
      +  "type": "string"
      +}
  4. First observedv1.5.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden. It does disclose genuinely behavioral traits beyond the schema — automatic cost tracking and model fallback with circuit-breaker resilience — which is real added value. However, it presents these as a feature list and omits operational concerns an agent would want (that each call is a billable external API call, latency, failure/error surface).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded, which is good, but the second half degenerates into a long comma-separated feature list that largely re-states parameter descriptions already in the schema (thinking mode, JSON output, tools, session_id). It's serviceable but not tight.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 12 parameters at 100% schema coverage and an output schema present, the description only needs to frame the tool and its modes, which it does: model tiers, legacy aliases, thinking mode, and session support are all covered. The main gap is routing guidance against the two siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema already documents model, thinking, json_mode, session_id, tools, response_schema and the rest in detail. The description merely gestures at the same parameters (session_id, tools, thinking mode, JSON output, multimodal) without adding syntax or semantics the schema lacks, so baseline 3 is right.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb+resource ('Chat with DeepSeek models') and enumerates the two current models with their tradeoffs (fast/economical vs Pro) plus 1M context. It's clear what the tool does, but it never names the siblings deepseek_fim or deepseek_sessions to say what this is *not*.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is useful guidance inside the description for model selection ('prefer deepseek-flash', legacy name resolution) and it mentions session_id for multi-turn use. But it never says when to reach for this tool versus deepseek_fim or deepseek_sessions, so the when-to-use-vs-alternatives question is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools