Skip to main content
Glama
arikusi

Deepseek MCP Server

by arikusi

DeepSeek FIM Completion

deepseek_fim

Completes missing text between a given prefix and optional suffix using DeepSeek's fill-in-the-middle model, ideal for code completion and content infilling.

Instructions

Fill-in-the-Middle (FIM) completion with DeepSeek. Provide a prompt (prefix) and an optional suffix; the model completes the text in between. Ideal for code completion and content infilling. Runs in non-thinking mode on the Beta endpoint; output is capped at 4K tokens. The legacy names deepseek-v4-flash, deepseek-chat and deepseek-reasoner are still accepted and resolve to deepseek-flash (FIM has no thinking mode). Includes automatic cost tracking and model fallback with circuit breaker resilience.

Input Schema

NameRequiredDescriptionDefault
stopNoOptional stop sequence(s). Generation stops when any is produced. A single string or an array of up to 16 strings.
modelNoModel to use. deepseek-flash (default, V4.1 Flash, fast/economical) or deepseek-v4-pro (V4 Pro). Legacy names deepseek-v4-flash / deepseek-chat / deepseek-reasoner are still accepted and resolve to deepseek-flash. FIM is always non-thinking.deepseek-flash
promptYesThe prefix text that comes before the content to generate. Required. For code completion, this is the code up to the cursor.
suffixNoOptional suffix text that comes after the content to generate. The model fills the gap between prompt and suffix.
max_tokensNoMaximum tokens to generate. FIM completions are capped at 4096 tokens by the API.
temperatureNoSampling temperature (0-2). Higher = more random. Default: 1.0.

Output Schema

NameRequiredDescriptionDefault
textYes
modelYes
usageYes
cost_usdNo
routed_fromNo
pricing_tierNo
finish_reasonYes

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). Deprecated aliases deepseek-chat / deepseek-reasoner are still accepted and resolve to v4-flash. FIM is always non-thinking."New value: +"Model to use. deepseek-flash (default, V4.1 Flash, fast/economical) or deepseek-v4-pro (V4 Pro). Legacy names deepseek-v4-flash / deepseek-chat / deepseek-reasoner are still accepted and resolve to deepseek-flash. FIM is always non-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 / pricing_tier
      Added value: +{
      +  "enum": [
      +    "peak",
      +    "off-peak"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field 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). Aliases deepseek-chat / deepseek-reasoner resolve to v4-flash. FIM is always non-thinking."New value: +"Model to use. deepseek-v4-flash (default, fast/economical) or deepseek-v4-pro (most capable). Deprecated aliases deepseek-chat / deepseek-reasoner are still accepted and resolve to v4-flash. FIM is always non-thinking."
  3. Addedv2.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: non-thinking mode only, Beta endpoint, hard 4K output cap, legacy model aliases resolving to deepseek-flash, plus cost tracking and fallback/circuit-breaker behavior. It omits auth requirements, rate limits, and error/failure semantics, which is the remaining gap.

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

Conciseness5/5

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

Four sentences, front-loaded with the core mechanic before operational constraints (endpoint, cap) and then the alias/fallback details. Only minor redundancy exists, since the legacy-model note is repeated in the model enum description.

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?

An output schema exists, so return values need no explanation, and the description covers the operational traits an agent needs (cap, endpoint, non-thinking constraint, fallback). Only the alias repetition and absent failure/auth notes keep it from full marks.

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%, so the schema already defines prompt, suffix, stop, model, max_tokens and temperature in detail. The description only restates the prompt/suffix prefix-and-gap semantics, adding no syntax, formatting, or edge-case guidance beyond structured fields — baseline 3.

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 ('Fill-in-the-Middle (FIM) completion') and the exact mechanics (prompt prefix + optional suffix, model fills the gap). The code-completion/content-infilling framing implicitly separates it from the conversational deepseek_chat sibling, but no sibling is ever named.

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?

'Ideal for code completion and content infilling' gives clear context for when to reach for this tool. There are no explicit exclusions or pointers to deepseek_chat for conversational turns, so the agent must infer the boundary itself.

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