Skip to main content
Glama
tina4stack

Claude Pascal MCP Server

by tina4stack

compile_pascal

Compile Pascal source code to verify it builds and retrieve compiler messages, including errors and warnings, without executing the program. Selects an available compiler automatically or uses a specified FPC/Delphi path.

Instructions

Compile Pascal source code and return compiler output.

Use this to check if code compiles without running it. Returns compiler messages including any errors or warnings.

Args: source_code: The complete Pascal source code to compile. Should include the program/unit header (e.g., 'program Hello;'). compiler: Which compiler to use. Can be a type name ('fpc', 'dcc32', 'dcc64') or a full path to a specific compiler executable (e.g., 'C:\Program Files (x86)\Embarcadero\Studio\37.0\bin\dcc64.exe'). If not specified, auto-selects the best available compiler.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
compilerNo
source_codeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.6

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that it does not run the code and returns compiler messages including errors/warnings. However, it does not mention potential side effects like creating executable files or intermediate artifacts, which could be relevant for a compile tool. This is a minor gap but not misleading.

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?

The description is appropriately sized, with a clear main purpose, a usage note, and a structured Args section. It is front-loaded with the core action and avoids redundancy. While it could be slightly more compact, it is efficient and easy to parse.

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?

Given that there is an output schema (though not shown), the description doesn't need to detail return values beyond stating it returns compiler messages. It covers the two parameters thoroughly and the main use case. It could mention what happens on successful compilation (e.g., no output or a success message), but the existing text is adequate for an agent to call it correctly.

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

Parameters5/5

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

The schema has no descriptions for the parameters (0% coverage), so the description fully compensates. It explains that source_code must include the program/unit header, and it details the compiler parameter, including allowed values (type names or full paths) and default auto-selection behavior. This adds significant meaning beyond the schema's type definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Compile Pascal source code and return compiler output,' which is a specific verb and resource. It distinguishes itself from siblings like run_pascal (which executes code) and check_syntax (which likely only checks syntax). The mention of 'without running it' further clarifies its scope.

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?

The description explicitly says 'Use this to check if code compiles without running it,' providing a clear when-to-use directive. It doesn't explicitly name alternatives like run_pascal or check_syntax, but the context of sibling tools makes it clear. It lacks an explicit exclusion for when not to use it, but the purpose is unambiguous.

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