Skip to main content
Glama
DMontgomery40

DeepSeek MCP Server

chat_completion

Generate text, analyze images, and manage multi-turn conversations using DeepSeek models, with options for reasoning effort, streaming, and tools.

Instructions

Primary DeepSeek V4.1 chat tool for text, images, and multi-turn generation. Defaults to deepseek-flash. Provide either message (a text string or text/image/file content parts) or messages (full chat history); if both are provided, messages is used. Images may use an HTTP(S) URL, supported base64 data URL, or Files API file_id. Thinking is enabled by default; use reasoning_effort for current effort controls. Use conversation_id for explicit in-memory context. Set include_raw_response=true only for provider-payload debugging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stopNo
modelNodeepseek-flash
toolsNo
top_pNo
streamNo
messageNo
user_idNo
logprobsNo
messagesNo
thinkingNo
extra_bodyNo
max_tokensNo
temperatureNo
tool_choiceNo
top_logprobsNo
stream_optionsNo
conversation_idNo
response_formatNo
presence_penaltyNo
reasoning_effortNo
frequency_penaltyNo
clear_conversationNo
include_raw_responseNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
usageNo
statusNo
messageNo
retryableNo
error_typeNo
suggestionNo
tool_callsNo
raw_responseNo
finish_reasonNo
response_textNo
conversation_idNo
reasoning_contentNo
stream_chunk_countNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.0.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / message / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "properties": {
      +            "text": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "type": {
      +              "const": "text",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "type",
      +            "text"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "additionalProperties": {},
      +          "properties": {
      +            "image_url": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "detail": {
      +                  "enum": [
      +                    "low",
      +                    "high",
      +                    "original",
      +                    "auto"
      +                  ],
      +                  "type": "string"
      +                },
      +                "url": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "url"
      +              ],
      +              "type": "object"
      +            },
      +            "type": {
      +              "const": "image_url",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "type",
      +            "image_url"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "additionalProperties": {},
      +          "properties": {
      +            "file_data": {
      +              "type": "string"
      +            },
      +            "file_id": {
      +              "pattern": "^file-api-[a-zA-Z0-9_-]+$",
      +              "type": "string"
      +            },
      +            "filename": {
      +              "maxLength": 512,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "type": {
      +              "const": "file",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "type"
      +          ],
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / message / minLength
      Removed value: -1
    • removedInput schema / properties / message / type
      Removed value: -"string"
    • changedInput schema / properties / messages / items / properties / content / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "items": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "properties": {
      +            "text": {
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "type": {
      +              "const": "text",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "type",
      +            "text"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "additionalProperties": {},
      +          "properties": {
      +            "image_url": {
      +              "additionalProperties": false,
      +              "properties": {
      +                "detail": {
      +                  "enum": [
      +                    "low",
      +                    "high",
      +                    "original",
      +                    "auto"
      +                  ],
      +                  "type": "string"
      +                },
      +                "url": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "url"
      +              ],
      +              "type": "object"
      +            },
      +            "type": {
      +              "const": "image_url",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "type",
      +            "image_url"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "additionalProperties": {},
      +          "properties": {
      +            "file_data": {
      +              "type": "string"
      +            },
      +            "file_id": {
      +              "pattern": "^file-api-[a-zA-Z0-9_-]+$",
      +              "type": "string"
      +            },
      +            "filename": {
      +              "maxLength": 512,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "type": {
      +              "const": "file",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "type"
      +          ],
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / model / default
      Previous value: -"deepseek-v4-flash"New value: +"deepseek-flash"
    • changedInput schema / properties / reasoning_effort / enum
      Previous value: -[
      -  "low",
      -  "high",
      -  "max"
      -]New value: +[
      +  "none",
      +  "minimal",
      +  "low",
      +  "medium",
      +  "high",
      +  "xhigh",
      +  "max"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "conversation_id": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "error_type": {
      +      "enum": [
      +        "deepseek_api_error",
      +        "tool_execution_error"
      +      ],
      +      "type": "string"
      +    },
      +    "finish_reason": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "model": {
      +      "type": "string"
      +    },
      +    "raw_response": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "reasoning_content": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "response_text": {
      +      "type": "string"
      +    },
      +    "retryable": {
      +      "type": "boolean"
      +    },
      +    "status": {
      +      "anyOf": [
      +        {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "stream_chunk_count": {
      +      "anyOf": [
      +        {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "suggestion": {
      +      "type": "string"
      +    },
      +    "tool_calls": {
      +      "items": {
      +        "additionalProperties": {},
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "usage": {
      +      "anyOf": [
      +        {},
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed2 schema fields changedv0.6.0
    • changedInput schema / properties / reasoning_effort / enum
      Previous value: -[
      -  "high",
      -  "max"
      -]New value: +[
      +  "low",
      +  "high",
      +  "max"
      +]
    • addedInput schema / properties / user_id
      Added value: +{
      +  "maxLength": 512,
      +  "minLength": 1,
      +  "pattern": "^[a-zA-Z0-9_-]+$",
      +  "type": "string"
      +}
  3. Changed32 schema fields changedv0.5.0
    • addedInput schema / properties / clear_conversation
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / extra_body
      Added value: +{
      +  "additionalProperties": {},
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • removedInput schema / properties / frequency_penalty / default
      Removed value: -0.1
    • addedInput schema / properties / include_raw_response
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • addedInput schema / properties / logprobs
      Added value: +{
      +  "type": "boolean"
      +}
    • removedInput schema / properties / max_tokens / default
      Removed value: -8000
    • addedInput schema / properties / message / minLength
      Added value: +1
    • addedInput schema / properties / messages / items / additionalProperties
      Added value: +{}
    • addedInput schema / properties / messages / items / properties / content / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / messages / items / properties / content / type
      Removed value: -"string"
    • addedInput schema / properties / messages / items / properties / name
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / messages / items / properties / prefix
      Added value: +{
      +  "type": "boolean"
      +}
    • addedInput schema / properties / messages / items / properties / reasoning_content
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / messages / items / properties / role / enum
      Previous value: -[
      -  "system",
      -  "user",
      -  "assistant"
      -]New value: +[
      +  "system",
      +  "user",
      +  "assistant",
      +  "tool"
      +]
    • addedInput schema / properties / messages / items / properties / tool_call_id
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / messages / items / properties / tool_calls
      Added value: +{
      +  "items": {
      +    "additionalProperties": {},
      +    "propertyNames": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / messages / items / required
      Previous value: -[
      -  "role",
      -  "content"
      -]New value: +[
      +  "role"
      +]
    • addedInput schema / properties / messages / minItems
      Added value: +1
    • changedInput schema / properties / model / default
      Previous value: -"deepseek-reasoner"New value: +"deepseek-v4-flash"
    • removedInput schema / properties / presence_penalty / default
      Removed value: -0
    • addedInput schema / properties / reasoning_effort
      Added value: +{
      +  "enum": [
      +    "high",
      +    "max"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / response_format
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {
      +    "type": {
      +      "enum": [
      +        "text",
      +        "json_object"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "type"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / stop
      Added value: +{
      +  "anyOf": [
      +    {
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "maxItems": 16,
      +      "minItems": 1,
      +      "type": "array"
      +    }
      +  ]
      +}
    • addedInput schema / properties / stream
      Added value: +{
      +  "default": false,
      +  "type": "boolean"
      +}
    • addedInput schema / properties / stream_options
      Added value: +{
      +  "additionalProperties": {},
      +  "properties": {
      +    "include_usage": {
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
    • removedInput schema / properties / temperature / default
      Removed value: -0.7
    • addedInput schema / properties / thinking
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "type": {
      +      "enum": [
      +        "enabled",
      +        "disabled"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / tool_choice
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "none",
      +        "auto",
      +        "required"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "additionalProperties": {},
      +      "properties": {
      +        "function": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "name": {
      +              "minLength": 1,
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "name"
      +          ],
      +          "type": "object"
      +        },
      +        "type": {
      +          "const": "function",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type",
      +        "function"
      +      ],
      +      "type": "object"
      +    }
      +  ]
      +}
    • addedInput schema / properties / tools
      Added value: +{
      +  "items": {
      +    "additionalProperties": {},
      +    "properties": {
      +      "function": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "description": {
      +            "type": "string"
      +          },
      +          "name": {
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "parameters": {
      +            "additionalProperties": {},
      +            "propertyNames": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          "strict": {
      +            "type": "boolean"
      +          }
      +        },
      +        "required": [
      +          "name"
      +        ],
      +        "type": "object"
      +      },
      +      "type": {
      +        "const": "function",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "function"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / top_logprobs
      Added value: +{
      +  "maximum": 20,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • removedInput schema / properties / top_p / default
      Removed value: -1
  4. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly=false, openWorld=true), and the description adds non-obvious behavior beyond them: default model, thinking enabled by default, how reasoning_effort controls it, and that conversation_id maintains in-memory state. It does not cover streaming behavior or side effects of clear_conversation.

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

Conciseness4/5

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

Five dense sentences, no filler, with the core capability and input-routing rule front-loaded. Slightly cramped since it compresses many parameter caveats into a single block, but nothing is wasteful.

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?

For a 23-parameter, open-world generative tool with an output schema, the description covers routing, defaults, state, and the two primary input modes, so return values need not be described. Gaps remain around streaming and clear_conversation semantics, but the essential picture is complete.

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 coverage is 0% across 23 params, so the description must compensate, and it does explain the highest-stakes ones: message/messages mutual exclusivity, accepted image URL forms, file_id usage, model default, reasoning_effort, and include_raw_response. The remaining ~16 parameters (temperature, tools, tool_choice, stream, clear_conversation, penalties, response_format, etc.) are left entirely to the bare schema, so it only partially fills a large gap.

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 specific verb+resource ('chat tool for text, images, and multi-turn generation') and names the model family and default. It does not, however, differentiate itself from siblings like `completion` or `create_response`, so an agent still has to infer why 'primary' means this one should be preferred.

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?

Gives clear conditional rules for its own parameters (message vs messages precedence, when to use conversation_id, when to set include_raw_response), which is genuine usage guidance. But it never says when to pick this tool over `completion`/`create_response`, which is the more consequential routing decision.

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