Skip to main content
Glama

deepseek_generate_to_file

Generates code, tests, or fixtures with DeepSeek from instructions and reference files, writes the content directly to a target file in a Git worktree, and returns a short metadata report.

Instructions

Read reference files, generate code/tests/fixtures with DeepSeek directly to output_path inside worktree_root, and return only a short metadata report.

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": {
      "output_path": "<output_path>",
      "instruction": "<instruction>",
      "worktree_root": "<worktree_root>"
    },
    "name": "deepseek_generate_to_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
thinkingNoOptional flag to enable DeepSeek reasoning mode (defaults to false).
input_pathsNoReference input file paths (absolute or relative to worktree_root). Pass [] when generating from scratch.
instructionYesDetailed generation instructions for the target file.
output_pathYesDestination file path inside worktree_root where generated content is written.
worktree_rootYesRoot directory of the active git worktree; writes outside this root are blocked.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the load and does disclose two useful behaviors: writes outside worktree_root are blocked, and only a short metadata report comes back rather than the generated text. It is silent on overwrite behavior for an existing output_path, failure/partial-write handling, and cost or latency of a DeepSeek generation call.

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?

A single front-loaded sentence that names the read step, the generation step, the write destination, and the return shape, with no redundant clauses.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covering the return value as a short metadata report is valuable given there is no output schema, and the write boundary is stated. For a generation-plus-file-write tool with zero annotations, however, the definition should also address whether an existing file is overwritten and what the caller should do with the returned metadata.

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 all five parameters are already documented, giving a baseline of 3. The description reinforces the output_path/worktree_root relationship and that input_paths are reference material, but adds no format or constraint detail beyond the schema.

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?

Clearly states a specific verb and artifact set: it reads reference files, then generates code/tests/fixtures with DeepSeek and writes them to output_path under worktree_root. The file-targeted, mutating nature distinguishes it from deepseek_analyze_files and read_board, though no sibling is named explicitly.

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?

Usage is only implied: reach for this when you want generated content persisted to disk rather than returned inline. There is no explicit when-to-use/when-not statement and no guidance on choosing it over deepseek_analyze_files for reference-file work.

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