Skip to main content
Glama

Classes, rules and service codes

classes_e_regras
Read-onlyIdempotent

Get CP travel classes, booking horizon, passenger limits and service codes (AP, IC, ...) to choose the right ticket rules before booking a Portuguese train journey.

Instructions

Travel classes, booking horizon (days ahead), passenger limits and the service codes (AP, IC, ...) CP uses.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "classes_e_regras"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

The annotations already establish readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is fully covered without description help. The description usefully adds the content domain (what data categories come back), which matters because there is no output schema. It does not describe the shape of the response or how the classes/rules relate to each other.

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 dense sentence with no filler, front-loading the primary content (travel classes) before the secondary rule fields. Minor deduction for the unexpanded acronym 'CP' and the trailing ellipsis in '(AP, IC, ...)', which leave a small amount of decoding to the agent.

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

Completeness3/5

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

With no parameters and no output schema, the description carries the burden of telling the agent what comes back, and it does list the four content categories. However, it does not say how the result is structured, whether classes and rule values are keyed by train type or route, or what units/freshness the booking horizon has. Adequate to trigger the call, thin for interpreting the result.

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 tool takes zero parameters and the schema confirms an empty properties object, so there is nothing for the description to disambiguate. Baseline 4 applies; the description makes clear this is a parameterless reference call.

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 enumerates the concrete resource contents: travel classes, booking horizon in days ahead, passenger limits, and service codes like AP/IC. That is specific enough to separate it from siblings such as horarios, precos or perturbacoes, which return time-, price- and disruption-oriented data. It is a noun phrase rather than a verb-led statement of what the tool returns, which keeps it just short of a 5.

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 when-to-use or when-not-to-use guidance and no alternative is named. The agent must infer that this is a static reference/lookup endpoint to consult before interpreting class or service-code fields elsewhere. Nothing in the text tells the agent what question this tool answers.

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