Skip to main content
Glama

Evaluate Sage Streaming

evaluate_sage_streaming

Execute SageMath code and receive intermediate print() output line by line while obtaining the final result as usual.

Instructions

Execute SageMath code and stream intermediate print() output line by line. Final result is returned as usual.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesSageMath code to execute
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
timeout_secondsNoOverride timeout in seconds

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
latexNoLaTeX serialization of the result when requested and supported.
resultNoString representation of the expression result if available.
stdoutNoCaptured stdout emitted during execution.
elapsed_msYesWall-clock execution time in milliseconds.
result_typeYes

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.7/5.0
Behavior3/5

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

Annotations already indicate this is not read-only, not idempotent, and not destructive. The description adds the streaming behavior, which is a useful behavioral trait. However, it does not disclose potential side effects of executing arbitrary SageMath code (e.g., state changes in the session), which is a notable gap given the tool executes code.

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, efficient sentence that front-loads the core action and streaming behavior. There is no wasted wording, and it is immediately scannable.

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

Completeness3/5

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

For a tool that executes arbitrary code, the description is thin. It does not mention session handling, error behavior, or that execution may have side effects on the workspace. The presence of an output schema covers return values, but the description leaves out important context about the execution environment and potential state changes.

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 all three parameters (code, session, timeout_seconds) are already described in the schema. The description adds no additional parameter-level meaning beyond what the schema provides. The baseline of 3 applies because the schema does the heavy lifting.

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 clearly states the action (execute SageMath code) and the distinguishing feature (stream intermediate print() output line by line). It also mentions the final result is returned as usual, which clarifies the full behavior. This differentiates it from siblings like evaluate_sage, which presumably does not stream.

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 use case: when streaming intermediate output is needed. However, it does not explicitly name an alternative or provide when-to-use/when-not-to-use guidance. The streaming feature is a strong signal, but the lack of explicit comparison to evaluate_sage leaves some ambiguity.

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