Skip to main content
Glama
codal-mcp

codal-mcp

by sepehr071

Read one Codal letter

cd_letter
Read-onlyIdempotent

Read one Codal.ir letter and return its text or table rows, with links to the page, PDF, Excel file, and attachments; request another sheet for multi-sheet reports.

Instructions

Read one codal.ir letter: its text or tables, plus links to its page, PDF, Excel and attachments.

Structured reports come back as tables (one line per row, cells joined by ' | ', usually million Rial; see unit_note), one sheet at a time: sheets lists them, call again with sheet for another. Other letters give text. attachments are the company's files. Cut at 16,000 characters (truncated); the PDF has all.

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": {
      "tracing_no": "<tracing_no>"
    },
    "name": "cd_letter"
  }
}

Input Schema

NameRequiredDescriptionDefault
sheetNoSheet id from the `sheets` list of a previous call; omit for the first sheet.
tracing_noYesTracing number (شماره پیگیری) from cd_search_letters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.0
    • changedInput schema / properties / sheet / description
      Previous value: -"For financial statements with several sheets: the `sheet` id from the `sheets` list of a previous call, e.g. 0 for the balance sheet. Omit for the first sheet."New value: +"Sheet id from the `sheets` list of a previous call; omit for the first sheet."
    • changedInput schema / properties / tracing_no / description
      Previous value: -"Tracing number (شماره پیگیری) from cd_search_letters, e.g. 1612323."New value: +"Tracing number (شماره پیگیری) from cd_search_letters."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/not-destructive, but the description adds genuinely non-obvious behavior: output is cut at 16,000 characters with a `truncated` flag, pagination is per-sheet rather than one call, values are usually in million Rial (see `unit_note`), and the PDF contains the untruncated content. That is exactly the extra context an agent cannot infer from structured fields.

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?

Front-loaded with what the tool returns, then the sheet-paging rule, then the truncation caveat — a logical order with no filler sentences. It is dense with backticked field names, which is efficient for an agent but slightly hard to parse as prose.

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

Completeness5/5

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

With no output schema, the description nevertheless explains every return shape an agent will encounter: `tables`, `text`, `sheets`, `attachments`, `unit_note`, `truncated`, and the PDF fallback. For a two-parameter read tool this leaves nothing material unexplained.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline would be 3, but the description adds real meaning: `sheet` is an id taken from a previous call's `sheets` list and omitted for the first sheet, and `tracing_no` is sourced from cd_search_letters. These are operational semantics beyond the bare schema text.

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?

"Read one codal.ir letter" gives a specific verb and resource, and immediately enumerates what is returned (text or tables, plus page/PDF/Excel/attachment links). The word "one" implicitly contrasts with the sibling search tool, though no sibling is named directly in the description.

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 sets a clear workflow: structured reports return one sheet at a time, and the caller must re-invoke with `sheet` to page through the rest. It also says short/long-text fallback is the PDF. It stops short of explicitly stating when to use this instead of cd_search_letters or cd_company, leaving that routing to the schema's reference to cd_search_letters.

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