Skip to main content
Glama
mathmethods-mcp

mathmethods-mcp

integral_simpson13

Approximate definite integrals of f(x) on [a,b] via composite Simpson 1/3; returns value, error estimates, table, and optional plot.

Instructions

Approximate the definite integral of f(x) on [a, b] with composite Simpson 1/3.

Args: func_str: Math expression in x, e.g. "sin(x)/x". a: Lower integration limit. b: Upper integration limit (must be > a). n: Number of subintervals (must be even). Error is O(h^4). epsilon: Point in [a, b] used to report the truncation error bound. precision: Rounding digits. plot: When True, also return a PNG plot of f(x) over [a, b].

Returns: Dict with the approximated integral, error estimates and table. With plot=True a list [dict, Image] is returned instead.

Input Schema

NameRequiredDescriptionDefault
aYes
bYes
nYes
plotNo
epsilonNo
func_strYes
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

A3.8/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 it does disclose the return structure ('Dict with the approximated integral, error estimates and table') and the alternate return shape when plot=True ('[dict, Image]'). It also states the error order O(h^4). It stops short of covering cost/determinism, but the output-shape disclosure is genuinely valuable since no output schema exists.

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-loads the one-sentence purpose, then organizes the rest as Args/Returns with no filler. Each line carries an obligation (constraints, return shape), though the listed Args echo the schema field names and are somewhat longer than strictly needed.

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?

Given 7 params, 0% schema description coverage, no annotations, and no output schema, the description supplies the parameter meanings and return shape an agent needs to call it correctly. The remaining gap is sibling/selection context against the other quadrature methods, which is a usage-guideline concern rather than incompleteness of the call contract.

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 entirely, and it documents all seven parameters: func_str format, a/b limits, the even-n constraint and error order, epsilon's role in the truncation bound, precision as rounding digits, and the plot flag. This fully closes the gap left by the bare schema.

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?

States a specific verb+resource and names the exact method: 'Approximate the definite integral of f(x) on [a, b] with composite Simpson 1/3.' This implicitly distinguishes it from siblings like integral_trapecio and integral_simpson38 through the named rule, but it never explicitly routes the agent to those alternatives.

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 mention of the sibling integration tools (integral_rectangulo, integral_trapecio, integral_simpson38, integral_comparar). The only usage-relevant cues are embedded constraints (n must be even, b > a), which are closer to parameter semantics than routing guidance.

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