Skip to main content
Glama

Differentiate Expression

differentiate_expression
Idempotent

Differentiate a mathematical expression symbolically with respect to a specified variable, including higher-order derivatives. Solves calculus problems by returning the exact derivative.

Instructions

Differentiate an expression with respect to a variable

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderNoOrder of differentiation (1 = first, 2 = second, etc.)
sessionNoWorkspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'.default
variableNoVariable for differentiationx
expressionYesExpression to differentiate

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • changedInput schema / properties / session / description
      Previous value: -"Named workspace to use. Workspaces have independent variables; omit for 'default'."New value: +"Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'."
  2. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / session
      Added value: +{
      +  "default": "default",
      +  "description": "Named workspace to use. Workspaces have independent variables; omit for 'default'.",
      +  "type": "string"
      +}
  3. First observedv0.3.1

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, and the description does not contradict them. The description adds no extra behavioral detail such as session side effects or result format, but for a simple pure computation the annotation profile carries much of that burden.

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 a single, focused sentence with no filler. The core operation and the key variable parameter are front-loaded, making it easy for an agent to parse quickly.

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 fully documented schema, safe annotations, and presence of an output schema, this terse description is sufficient for typical differentiation calls. It does not provide example syntax, but the surrounding structured metadata compensates for that gap.

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%, so the schema already documents expression, variable, order, and session. The description mainly restates the variable relationship and adds no extra meaning about order or session semantics, so the baseline 3 is appropriate.

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 uses a specific verb ('differentiate') and resource ('an expression'), and specifies the target variable ('with respect to a variable'). This makes it unambiguous and clearly distinct from siblings like integrate_expression or limit_expression.

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?

The description implies the usage context: call this tool when a derivative is requested. However, it provides no explicit when-not-to-use guidance or named alternatives, so the agent must infer selection from the tool name and the sibling list.

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