Skip to main content
Glama

RailCore Developers

Get a working code sample

get_code_sample
Read-onlyIdempotent

Working code for a RailCore API endpoint in curl, Node.js, Python, PHP, Go or Java. Set signed to true for Growth, Scale and Enterprise keys, which must sign every request with HMAC-SHA256. Samples read the key from RAILCORE_KEY and the signing secret from RAILCORE_HMAC_SECRET, and work out their dates when they run.

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": {
      "endpoint": "<endpoint>",
      "language": "<language>"
    },
    "name": "get_code_sample"
  }
}

Input Schema

NameRequiredDescriptionDefault
signedNotrue for Growth, Scale and Enterprise keys, which must sign every request. Default: true only for endpoints that signing plans alone can use.
endpointYesAn endpoint id, a method and path, or a URL.
languageYescurl, node, python, php, go or java.

Output Schema

NameRequiredDescriptionDefault
codeYes
notesYes
signedYes
docs_urlYes
env_varsYes
languageYes
endpoint_idYes
catalog_generated_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive behavior. The description adds substantial context beyond that: samples read credentials from RAILCORE_KEY and RAILCORE_HMAC_SECRET, compute dates at runtime, and require HMAC-SHA256 signing for Growth, Scale, and Enterprise plans.

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?

Three tightly packed sentences, front-loaded with the core deliverable and language options. Every sentence adds distinct information—output format, signing behavior, credential and date handling—with no filler.

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?

An output schema exists, so return values need not be explained. The description covers language options, signing requirements, environment variables, and date behavior, which is enough to call the tool correctly. Minor gaps like endpoint-format handling are already covered by the schema.

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 is 3. The description adds genuine meaning for the signed parameter by naming the affected plan tiers, the HMAC-SHA256 requirement, and the environment variables the generated sample depends on. The endpoint parameter is not elaborated beyond the schema, which keeps this from a 5.

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 clearly states the resource: working code for a RailCore API endpoint in six named languages. It does not explicitly contrast with siblings like get_endpoint or explain_error, but the purpose is unambiguous from the phrase itself.

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

Usage Guidelines3/5

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

Usage is implied—request this when you need a runnable code sample for an endpoint—but there is no explicit when-to-use or when-not-to-use guidance, and no sibling alternative is named. The signed-plan note gives some context but is not routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources