Skip to main content
Glama

extract_doc

Read-onlyIdempotent

Extract embedded documentation from MetaTrader MQL source files. Provide an absolute Windows path to a .mq4/.mq5/.mqh file and receive its documented content.

Instructions

DEPRECATED (removed in 0.6.0): use inspect_source(source, aspects=["docs"]).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesAbsolute Windows path to the .mq4/.mq5/.mqh source file.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.0
    • addedInput schema / properties / source / description
      Added value: +"Absolute Windows path to the .mq4/.mq5/.mqh source file."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "extract_docDictOutput",
      +  "type": "object"
      +}
  2. First observedv0.4.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate read-only, idempotent, and non-destructive behavior. The description adds the crucial behavioral fact that the tool has been removed from the API and will not work, along with the migration path. This goes beyond the annotations and sets correct expectations without contradicting them.

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?

The description is a single front-loaded sentence that immediately signals deprecation and then gives the replacement. There is no filler, and every word contributes to the agent's decision.

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?

For a one-parameter, deprecated tool with rich annotations and an output schema, the description supplies the essential missing context: it is removed and should be replaced by inspect_source with aspects=['docs']. A small deduction is warranted because it does not explicitly say what calling it will do now or what the original return value was, but the deprecation warning largely covers this.

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?

The only parameter, source, is already fully described in the schema as an absolute Windows path to .mq4/.mq5/.mqh files, so schema coverage is 100%. The description does not add additional parameter-level details beyond showing source used in the replacement call, which keeps this at the baseline.

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 does not directly state what extract_doc originally did, but it clearly marks the tool as removed and identifies the exact successor call, which conveys its doc-extraction purpose. It also distinguishes this tool from siblings by labeling it deprecated, though a direct 'extracts documentation' statement would make it fully explicit.

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

Usage Guidelines5/5

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

The description explicitly says the tool is deprecated/removed and gives the precise alternative invocation: inspect_source(source, aspects=["docs"]). This is exemplary usage guidance because it tells the agent not only to avoid this tool but exactly what to call instead.

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