Skip to main content
Glama

Coding Theory Operation

coding_theory_operation
Idempotent

Compute error-correcting code parameters—length, dimension, minimum distance, rate, and generator matrix—for Hamming and generalized Reed-Solomon codes.

Instructions

Error-correcting codes: length, dimension, minimum distance, rate and generator matrix for Hamming and generalized Reed-Solomon codes. Prefer this over evaluate_sage for code parameters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoWorkspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'.default
code_typeYesCode constructor, e.g. 'HammingCode(GF(2),3)', 'GeneralizedReedSolomonCode(GF(7).list()[:6],3)'
operationYesOne of: length, dimension, minimum_distance, generator_matrix, rate

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • changedInput schema / properties / session / description
      Previous value: -"Named workspace to use. Workspaces have independent variables; omit for 'default'."New value: +"Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'."
  2. Changed2 schema fields changedv0.5.0
    • changedInput schema / properties / code_type / description
      Previous value: -"Code constructor, e.g. 'HammingCode(GF(2),3)', 'ReedSolomonCode(GF(7),3,5)'"New value: +"Code constructor, e.g. 'HammingCode(GF(2),3)', 'GeneralizedReedSolomonCode(GF(7).list()[:6],3)'"
    • addedInput schema / properties / session
      Added value: +{
      +  "default": "default",
      +  "description": "Named workspace to use. Workspaces have independent variables; omit for 'default'.",
      +  "type": "string"
      +}
  3. First observedv0.3.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, covering the safety profile. The description adds no behavioral context beyond the operations themselves (e.g., no mention of side effects, performance, or prerequisites). It does not contradict annotations, but also adds little value beyond 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?

Two sentences with no filler. The first sentence front-loads the purpose and scope, the second provides usage guidance. Every word earns its place.

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 are covered. The description covers purpose and usage adequately. It does not mention prerequisites like needing an active Sage session, but the session parameter is optional with a default, so this is a minor gap. Overall, the tool is simple enough that the description is sufficient.

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?

Schema coverage is 100%, and the schema already provides examples for code_type and lists operation values. The description repeats these lists without adding new meaning. It offers no additional syntax or edge-case details, so it does not significantly enhance parameter understanding.

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 states a specific resource ('Error-correcting codes') and enumerates the operations (length, dimension, minimum distance, rate, generator matrix) and code types (Hamming, generalized Reed-Solomon). It explicitly differentiates from a sibling by saying 'Prefer this over evaluate_sage for code parameters', making the tool's purpose unambiguous.

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 gives explicit guidance to prefer this tool over evaluate_sage for code parameters, naming the alternative and the condition. It does not mention when not to use it or other alternatives, but the stated preference is clear and actionable.

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