DeepSeek code assistant
deepseek_codePass inline code or file paths with a task to generate, review, refactor, test, debug, explain, document, optimize, or convert code; routes each task to a suitable DeepSeek model.
Instructions
Task-oriented coding helper. Pick a task (generate, review, refactor, explain, test, debug, document, optimize, convert) and pass code inline and/or as file paths. Routes to deepseek-reasoner for debug/review/optimize and deepseek-chat otherwise, unless you override model.
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": {
"task": "<task>"
},
"name": "deepseek_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | Source code, inline. | |
| stop | No | Up to 16 stop sequences. A single string is also accepted. | |
| task | Yes | What to do with the code. | |
| error | No | Error message, stack trace or failing test output, for `debug`. | |
| extra | No | Arbitrary extra request-body fields, merged last so they override everything else. The escape hatch for any API parameter this server does not model yet. | |
| model | No | Override the model id for this call. | |
| paths | No | Files, directories or globs to read and include as context. | |
| tools | No | Function-calling definitions, passed to the API verbatim. Each item is { type: 'function', function: { name, description, parameters } }. | |
| top_p | No | Nucleus sampling, 0-1. Ignored by deepseek-reasoner. | |
| stream | No | Stream from the API and return the assembled result. Useful for very long outputs that would otherwise hit an idle timeout. | |
| language | No | Language or framework hint. | |
| logprobs | No | Return log probabilities. deepseek-chat only. | |
| json_mode | No | Shorthand for response_format { type: 'json_object' }. Your prompt must mention JSON and should show an example. | |
| max_tokens | No | Maximum output tokens. Omit for the server-side maximum (8192 for deepseek-chat, 65536 for deepseek-reasoner). No client-side cap is applied. | |
| session_id | No | Conversation key. Prior turns under this id are prepended automatically and this turn is appended, giving true multi-turn memory across tool calls. | |
| timeout_ms | No | Per-call timeout override in milliseconds. | |
| temperature | No | 0.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. | |
| tool_choice | No | 'auto', 'none', 'required', or { type: 'function', function: { name } }. | |
| instructions | No | What you want, in plain language. Required for `generate` and `convert`. | |
| raw_response | No | Return the complete unmodified API JSON instead of formatted text. | |
| top_logprobs | No | 0-20, requires logprobs. deepseek-chat only. | |
| include_usage | No | Append the token-usage and cache-hit footer. Default true. | |
| target_language | No | Destination language for `convert`. | |
| presence_penalty | No | -2.0 to 2.0. Ignored by deepseek-reasoner. | |
| frequency_penalty | No | -2.0 to 2.0. Ignored by deepseek-reasoner. | |
| include_reasoning | No | Include the chain-of-thought block in the result. Default true for deepseek-reasoner. |