Skip to main content
Glama
deepseek-mcp-server

deepseek-mcp-server

DeepSeek prefix completion

deepseek_prefix

Forces a model response to start with your supplied text, then continues generation so you can pin output formats, resume truncated answers, or steer refusal-prone completions.

Instructions

Beta prefix completion: force the model's reply to begin with text you supply, then let it continue. Use it to pin output format (start with '```python' to guarantee a code block), to resume a truncated answer, or to steer a refusal-prone completion. The prefix is included in the returned text.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prefix": "<prefix>"
    },
    "name": "deepseek_prefix"
  }
}

Input Schema

NameRequiredDescriptionDefault
stopNoUp to 16 stop sequences. A single string is also accepted.
extraNo
modelNo
top_pNoNucleus sampling, 0-1. Ignored by deepseek-reasoner.
prefixYesThe exact text the assistant reply must start with.
promptNoThe user message.
streamNo
systemNo
logprobsNoReturn log probabilities. deepseek-chat only.
messagesNoFull message array, OpenAI-compatible. Use this instead of `prompt` when you need multi-turn control. Roles: system, user, assistant, tool.
max_tokensNoMaximum output tokens. Omit for the server-side maximum (8192 for deepseek-chat, 65536 for deepseek-reasoner). No client-side cap is applied.
timeout_msNo
temperatureNo0.0-2.0. DeepSeek's own guidance: 0.0 for code and maths, 1.0 for general conversation and data analysis, 1.3 for creative writing. Ignored by deepseek-reasoner.
raw_responseNo
top_logprobsNo0-20, requires logprobs. deepseek-chat only.
presence_penaltyNo-2.0 to 2.0. Ignored by deepseek-reasoner.
frequency_penaltyNo-2.0 to 2.0. Ignored by deepseek-reasoner.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It usefully discloses beta status and that the prefix is included in the returned text, but says nothing about model-specific behavior (e.g. the reasoner ignoring sampling parameters), streaming, or failure modes — all of which the schema only partially covers.

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?

Three tight sentences with the core mechanic front-loaded and no filler. It could be marginally sharper by grouping the use cases, but nothing here is wasted.

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?

Slightly generous for a 17-parameter tool with no output schema and no annotations, since model selection, streaming, and the prompt/messages dichotomy go unexplained. Still, the description conveys the one thing an agent cannot get elsewhere — what prefix completion actually does — which is the highest-value gap to fill.

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 65% across 17 parameters, so the schema does most of the work. The description adds meaning to the required `prefix` parameter and gives a worked example, but says nothing about `messages[].prefix`, `stop`, `raw_response`, or how `prompt` and `messages` relate.

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?

The description names a specific mechanism — forcing the reply to begin with supplied text and then continuing — which is meaningfully distinct from a normal chat or FIM call. It stops short of explicitly contrasting itself with deepseek_chat or deepseek_fim, so an agent must infer the boundary rather than read it.

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?

Three concrete use cases are given (pinning output format with '```python', resuming a truncated answer, steering a refusal-prone completion), which is strong positive guidance. There is no when-not-to-use guidance and no named alternative for cases where prefix completion is the wrong tool.

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