Skip to main content
Glama

berlekamp_massey

Compute the shortest linear recurrence for an integer sequence to identify its generating pattern for analysis or forecasting.

Instructions

Find the shortest linear recurrence for a sequence using Berlekamp-Massey.

Input Schema

NameRequiredDescriptionDefault
sequenceYesInput sequence of integers

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden and does not meet it. It does not disclose what is returned (recurrence coefficients? order?), how short/degenerate sequences are handled, or any numerical caveats. For a math algorithm with zero annotation coverage this is a real gap.

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?

A single front-loaded sentence with no filler; every word earns its place.

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?

For a moderately complex algorithm with no output schema and no annotations, the description should at minimum describe the return value (the recurrence itself). It stops at the purpose, leaving the agent unsure what output to expect.

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 description coverage is 100%, covering the single 'sequence' parameter, so the baseline of 3 applies. The description adds nothing beyond the schema (it does not clarify length requirements or numeric type expectations).

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?

States a specific verb ('Find'), a precise resource ('the shortest linear recurrence for a sequence'), and names the algorithm (Berlekamp-Massey). This is unambiguous and distinct from the many other algorithm siblings such as continued_fraction or polynomial_ops.

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 context is implied by the pure-computational nature of the tool, but there is no explicit statement of when to prefer it, what inputs are valid (finite sequence? field?), or how it differs from related sequence tools. Adequate but leaves the agent to infer applicability.

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

Deploy Server

Other Tools