Skip to main content
Glama
datalattice

mcp-chainladder

by datalattice

parse_csv_triangle

Converts a CSV file from disk into a cumulative loss triangle by handling missing values, stripping thousand separators, and auto-padding rows, making the data ready for chain ladder reserving calculations.

Instructions

Parse a CSV file from disk into a cumulative loss triangle.

Reads the file, treats empty cells and the tokens "NA", "N/A", "NaN", "-" as unobserved, strips embedded commas (thousand separators), and drops any leading row whose first cell is non-numeric but whose remaining cells are mostly numeric (e.g. a "Dev 1, Dev 2, …" header). Auto-pads jagged rows to a rectangle with nulls.

Use this when the user gives you a CSV file path and wants to run the chain ladder on it.

Args: path: Absolute or ~-relative path to the CSV file. Must be readable by the server process.

Returns: - triangle: list[list[float | null]] — parsed cells, ready to pass to compute_chain_ladder - n_acc: int — number of accident-year rows - n_dev: int — number of development periods (max row length) - source: str — absolute path actually read

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries full burden and discloses specific behaviors: handling of empty cells and tokens, stripping commas, dropping header rows, padding jagged rows, and path requirements. It lacks error handling or performance details but is still informative.

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 well-structured with separate sections (Args, Returns) and front-loaded with the main purpose. It is somewhat lengthy but each sentence adds value; no redundancy.

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?

Given the tool's simplicity (1 parameter, no nested objects) and presence of an output schema (implied by 'Has output schema: true'), the description fully covers the tool's behavior, return values, and use case, leaving no significant gaps.

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?

The single parameter 'path' has no description in the input schema (coverage 0%). The tool description adds critical details: path must be absolute or ~-relative and readable by the server process, providing meaning beyond the schema type.

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 the tool's purpose with a specific verb ('Parse'), resource ('CSV file'), and outcome ('cumulative loss triangle'). It distinguishes itself from sibling tools that perform different operations (e.g., compute_chain_ladder, project_triangle).

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 provides a usage condition: 'Use this when the user gives you a CSV file path and wants to run the chain ladder on it.' While it does not list exclusions, the guidance is clear and relevant.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/datalattice/mcp-chainladder'

If you have feedback or need assistance with the MCP directory API, please join our Discord server