Skip to main content
Glama
MIRAI Intelligence & Research MCP

MIRAI Intelligence & Research MCP

by Tarant336

Source Generate

source_generate
Destructive

Writes batches of source files within a workspace, validating paths against the boundary, creating parent directories, and preventing overwrites unless explicitly allowed.

Instructions

Write a batch of source files under the workspace. Every path is validated against the workspace boundary, parent directories are created, and existing files are never overwritten unless explicitly allowed.

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": {
      "rootPath": "<rootPath>",
      "files": "<files>"
    },
    "name": "source_generate"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesYesFiles to write, each with a path relative to rootPath.
rootPathYesTarget root directory, relative to the workspace root.
overwriteNoAllow overwriting existing files (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description adds genuinely useful behavior: path validation against the workspace boundary, automatic parent-directory creation, and the crucial caveat that existing files are never overwritten unless allowed — which softens the blanket destructive hint. It does not cover partial-failure or atomicity behavior across a batch.

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 sentence with three substantive clauses, front-loaded with the action and resource. Every clause earns its place and nothing is padded.

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?

For a batch mutation tool with no output schema, the definition covers the safety envelope but says nothing about what is returned (written paths, per-file results) or how mid-batch failures behave. Annotations carry the destructive profile, so the gap is moderate rather than severe.

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 100%, so the schema already explains rootPath, files, and the overwrite default. The phrase "unless explicitly allowed" reinforces the overwrite flag's meaning but adds no format or constraint details beyond what the schema provides. Baseline 3 is appropriate.

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 and resource: "Write a batch of source files under the workspace." That clearly separates it from source_modify/source_refactor, which operate on existing files, though the description never names those siblings 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 by "batch of source files" and the no-overwrite default; there is no explicit statement of when to choose this over source_modify, source_refactor, or the other *_generate tools. The agent must infer the selection rule.

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