Skip to main content
Glama

preprocess_source

Runs the C/C++ preprocessor on a source file, accepting include directories, defines, flags, and timeout to generate preprocessed output.

Instructions

Run the C/C++ preprocessor on a source file.

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": {
      "source": "<source>"
    },
    "name": "preprocess_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
flagsNo
outputNo
sourceYes
definesNo
timeoutNo
include_dirsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full disclosure burden and falls well short. It does not say whether an 'output' path causes a file to be written (a side effect), what happens on preprocessing errors, or how the timeout is enforced — all material for a tool that may mutate the filesystem.

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?

A single front-loaded sentence with no filler or repetition. Its brevity is efficient rather than padded, though it tips into under-specification given the tool's parameter count.

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

Completeness2/5

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

For a six-parameter tool with no annotations, no output schema, and zero schema coverage, one sentence is far from sufficient. An agent knows what the tool does but not how to parameterize it, what it returns (stdout vs. file), or what failures look like.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% across six parameters, yet the description only alludes to the required 'source' argument. The meanings of flags, defines, include_dirs, output, and timeout — and their formats (e.g. are defines 'NAME=VALUE' or '-DNAME'?) — are left entirely undocumented.

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 gives a specific verb and resource ('Run the C/C++ preprocessor on a source file'), which is unambiguous. It does not, however, differentiate this from nearby siblings such as compile_c or compile_cpp, nor does it state how the output differs from a compile step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this versus compile_c/compile_cpp, or when a bare preprocessing pass (e.g. to inspect macro expansion) is the right choice. No prerequisites, no exclusions, no mention of what to do with the result.

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