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

step-by-step-math

by gonzavh17

differentiate

Read-onlyIdempotent

Compute symbolic derivatives of expressions with respect to a chosen variable using SymPy, returning results in SymPy syntax and LaTeX. Use it whenever an exact derivative is needed.

Instructions

Differentiate an expression with respect to a variable using a symbolic engine (SymPy). ALWAYS use it when a derivative is needed: do not differentiate by hand or adjust the result. Expression syntax (SymPy): x**2 (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). Returns the result in SymPy syntax and in LaTeX.

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": "differentiate"
  }
}

Input Schema

NameRequiredDescriptionDefault
variableNox
expressionYes

Output Schema

NameRequiredDescriptionDefault
latexYes
resultYes
variableYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint, and closed-world behavior, so safety is covered. The description adds valuable behavioral context by naming the symbolic engine, listing accepted syntax, and stating that results are returned in SymPy and LaTeX format.

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?

The description is front-loaded with the core purpose and usage rule, followed by compact syntax and return-format details. Every sentence carries useful information, and there is no filler.

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 the output schema exists, the description need not explain return values in detail. It covers syntax, usage, and SymPy/LaTeX output, though it leaves the variable parameter's default and format implicit, which is a minor gap for a 0%-schema-coverage tool.

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 0%, so the description must compensate. It does a strong job documenting the expression parameter's syntax, aliases, and constants, but it does not explain the variable parameter's default value or expected format beyond saying 'with respect to a variable.'

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 verb and resource: differentiate an expression with respect to a variable using SymPy. This clearly distinguishes it from the sibling integrate tool, which performs the inverse operation.

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?

It gives clear usage guidance: 'ALWAYS use it when a derivative is needed' and explicitly says not to differentiate by hand or adjust the result. It does not name sibling tools or describe when to use them, but the main when-to-use condition is unambiguous.

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