Skip to main content
Glama

Expand Expression

expand_expression
Idempotent

Expand a mathematical expression into an equivalent form by removing parentheses and combining like terms, simplifying calculations and equation solving.

Instructions

Expand a mathematical expression

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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
expressionYesExpression to expand

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

C2.8/5.0
Behavior2/5

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

The description provides no behavioral traits beyond what the annotations already state. It does not clarify whether session state is modified, whether the operation is purely computational, or what side effects might occur; readOnlyHint=false leaves this unclear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single short sentence with no redundancy, but it is so minimal that it borders on under-specification. It is concise without being informative beyond the title.

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

Completeness2/5

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

Given the large sibling set and the existence of similar tools, the one-line description is not enough for correct tool selection. The output schema reduces the need to describe return values, but the description still lacks scope, input expectations, and relationship to alternative operations.

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 both parameters. The description adds no meaning beyond naming the expression parameter, which is the baseline for fully covered schemas.

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?

The description clearly states a verb and resource: expand a mathematical expression. It is understandable on its own, but it does not differentiate from siblings like simplify_expression, factor_expression, or series_expansion.

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 guidance about when to use this tool versus alternatives. An agent must infer from the tool name alone that expand is the right choice instead of simplify, factor, or series expansion.

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