Skip to main content
Glama

DeepSeek Chat Completion

deepseek_chat

Chat with DeepSeek V4 models (flash for speed, pro for capability) offering 1M context, multi-turn sessions, function calling, thinking mode, JSON output, and multimodal input.

Instructions

Chat with DeepSeek V4 models. deepseek-v4-flash (fast, economical) and deepseek-v4-pro (most capable), both 1M context with optional chain-of-thought thinking mode. deepseek-chat and deepseek-reasoner are accepted as backward-compatible aliases (resolve to v4-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

TableJSON Schema
NameRequiredDescriptionDefault
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.
modelNoModel 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.deepseek-v4-flash
temperatureNoSampling temperature (0-2). Higher = more random. Default: 1.0. Ignored when thinking mode is enabled.
max_tokensNoMaximum tokens to generate. V4 models support up to 384000 output tokens.
streamNoEnable streaming mode. Returns full response after streaming completes.
toolsNoArray of tool definitions for function calling. Each tool has type "function" and a function object with name, description, and parameters (JSON Schema).
tool_choiceNoControls which tool the model calls. "auto" (default), "none", "required", or {type:"function",function:{name:"..."}}
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.
reasoning_effortNoReasoning effort while thinking mode is active: "high" (default) or "max". Only applies when thinking is enabled.
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.
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
reasoning_contentNo
modelYes
usageYes
finish_reasonYes
tool_callsNo
cost_usdNo
routed_fromNo
session_idNo
Behavior4/5

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

Despite no annotations, the description discloses key behavioral traits: model capabilities (1M context, up to 384K output), thinking mode, streaming, cost tracking, and circuit breaker resilience. However, it does not mention error handling, rate limits, or idempotency, which would improve transparency.

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?

The description is a single dense paragraph but remains informative and front-loaded with purpose. It could be more scannable with bullet points, but every sentence adds value. No superfluous content.

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?

Given the tool's complexity (11 parameters, output schema present), the description covers features, model options, and capabilities. It lacks details on error handling but is otherwise complete enough for an AI agent to select and invoke the tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds significant value beyond schema by explaining model aliases, default thinking behavior, JSON output hints, and session_id auto-creation. This enhances parameter understanding and usage.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Chat with DeepSeek V4 models'. It specifies verb (chat), resource (DeepSeek V4 models), and key capabilities. It also distinguishes from the sibling tool 'deepseek_sessions' by focusing on chat completion rather than session management.

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

Usage Guidelines4/5

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

The description provides clear guidance on when to use the tool (chat completion tasks) and explains model alias mapping (deepseek-chat -> v4-flash, deepseek-reasoner -> v4-flash thinking). It implies when not to use (e.g., if session management is needed, use deepseek_sessions), though it does not explicitly state exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/arikusi/deepseek-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server