Skip to main content
Glama
step-by-step-math

step-by-step-math

by gonzavh17

integrate

Read-onlyIdempotent

Computes symbolic indefinite and definite integrals step by step with SymPy, showing each step on a visual whiteboard for methods like parts, substitution, and partial fractions.

Instructions

Integrate an expression step by step with a symbolic engine (SymPy) and show every step on a visual whiteboard. NEVER integrate by hand and never change the result. method: 'auto' (default) or the method the user asks for: 'parts' (give u, optionally dv), 'substitution' (give u as a function of the variable, e.g. 'x2'), 'partial_fractions'. Use exactly the method and u the user chose; if the tool returns an error, tell the user and do not switch methods on your own. The user already sees all the steps on the whiteboard: do NOT rewrite or recompute them in your reply. Answer with the result and at most one short sentence about the method. If the whiteboard is not displayed in this app, give the user board_url (or board_path). Indefinite: omit 'lower'/'upper'; the result includes + C. Definite: give both limits (0, pi/2, E, oo, -oo); discontinuities are handled as improper integrals and status may be 'diverges' with an explanation. 'verification' is 'verified' or 'inconclusive' (only numeric). If the user brings their own antiderivative, use verify_antiderivative instead. Expression syntax (SymPy): x2 (or x^2), 3*x (explicit multiplication), sin(x), cos(x), tan(x), exp(x), log(x) (natural log), sqrt(x), asin(x), atan(x). Also accepts sen, tg and ln. Constants: pi, E, oo (infinity).

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": {
      "expression": "<expression>"
    },
    "name": "integrate"
  }
}

Input Schema

NameRequiredDescriptionDefault
uNo
dvNo
lowerNo
upperNo
methodNoauto
variableNox
expressionYes

Output Schema

NameRequiredDescriptionDefault
kindYes
latexYes
stepsYes
methodYes
resultYes
statusNo
board_idYes
improperNo
warningsNo
board_urlNo
board_pathNo
explanationNo
verificationYes
discontinuitiesNo
generic_fallbackNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/closed-world, but the description adds substantial context beyond them: discontinuities become improper integrals with a possible 'diverges' status, 'verification' is 'verified' or 'inconclusive', and board_url/board_path should be surfaced if the whiteboard isn't shown. It also discloses that the tool refuses to switch methods on error.

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?

Purpose is front-loaded and the dense content is mostly high-value syntax and behavioral rules. It runs long, and the 'do NOT rewrite the steps' instruction is restated in slightly different form, costing some tightness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter symbolic tool with an output schema, the description covers the remaining unknowns: definite vs indefinite behavior, improper integrals, error handling, verification semantics, and how the agent should present results. Nothing an agent needs to call it correctly is missing.

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?

With 0% schema description coverage the description carries the full burden, and it documents method enum semantics (parts needs u and optionally dv, substitution needs u as a function of the variable, partial_fractions), the lower/upper distinction, and the accepted expression syntax and constants. The 'variable' parameter is never explained directly, which is the one real gap.

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 and resource ('Integrate an expression step by step with a symbolic engine (SymPy)') plus the whiteboard side effect. It also names the sibling it is not (verify_antiderivative) for the case of a user-supplied antiderivative, so the agent can route without opening schemas.

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

Usage Guidelines5/5

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

Explicit when/when-not rules: use verify_antiderivative if the user brings their own antiderivative, omit lower/upper for indefinite, supply both for definite, and use exactly the method and u the user chose. It also instructs what to do on error (report, do not switch methods), leaving little to inference.

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