Skip to main content
Glama
mathmethods-mcp

mathmethods-mcp

root_comparar

Compare bisection, fixed-point, Newton-Raphson, and Aitken on one problem; get per-method results and an optional iteration bar chart.

Instructions

Compare bisection, fixed-point, Newton-Raphson and Aitken on the same problem.

Args: func_str: Math expression for f(x) (used by bisection/Newton). g_str: Math expression for g(x) (used by fixed-point/Aitken). a, b: Bracket for bisection (f(a) and f(b) must differ in sign). x0: Initial guess. tol, max_iter, precision: Shared tolerances. plot: When True, also return a PNG bar chart of the iterations used.

Returns: Dict with per-method results. With plot=True a list [dict, Image] is returned instead.

Input Schema

NameRequiredDescriptionDefault
aYes
bYes
x0Yes
tolNo
plotNo
g_strYes
func_strYes
max_iterNo
precisionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.1
    • addedInput schema / properties / plot
      Added value: +{
      +  "default": false,
      +  "title": "Plot",
      +  "type": "boolean"
      +}
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does reasonably well: it discloses the bracket sign-requirement for bisection ('f(a) and f(b) must differ in sign'), which parameters feed which methods, and the conditional return shape when plot=True. It stops short of stating that this is a pure/stateless computation with no side effects, leaving that to inference.

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?

Front-loaded one-line purpose followed by a scannable Args/Returns block; every line earns its place. It is slightly boilerplate in form but not padded.

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?

For a 9-parameter tool with no output schema and no annotations, the description covers inputs, the sign precondition, and the return shape ([dict, Image] when plot=True), which is what an agent needs to invoke it. It could add a note on failure modes (e.g., non-convergence) but is otherwise complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate and it does: all nine parameters are explained, including the non-obvious mapping of func_str to bisection/Newton, g_str to fixed-point/Aitken, a/b as the bisection bracket with the sign constraint, and tol/max_iter/precision as shared tolerances. This adds substantial meaning beyond the bare schema.

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 first sentence states a specific verb ('Compare') and names the exact four methods (bisection, fixed-point, Newton-Raphson, Aitken) it runs on the same problem. This clearly distinguishes it from the sibling single-method tools root_bisection, root_newton_raphson, root_punto_fijo, and root_aitken.

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 by the comparison framing — reach for it when you want all four methods side by side — but there is no explicit when-to-use/when-not guidance or statement contrasting it with calling the individual sibling tools. An agent must infer the selection criterion.

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