Skip to main content
Glama

evaluate_sage_streaming

Executes SageMath code while streaming intermediate print() output line by line, then returns the final result.

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

B3.4/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, covering the safety profile. The description adds the streaming of print() output and notes final result behavior, which is useful beyond annotations, but omits side-effect details like workspace state mutation or timeout semantics. With annotations already covering safety, a 3 is appropriate.

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?

Two short sentences, front-loaded with the core action and then the distinguishing streaming behavior. Every sentence earns its place with no waste.

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?

An output schema exists, so return values needn't be explained. The description covers the distinctive streaming behavior, and session/timeout details are fully handled by the rich schema. It is complete enough for an agent to invoke correctly, though it could note side effects more explicitly.

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 fully documents all three parameters. The description adds no parameter-level meaning beyond what is in the schema, making the baseline 3 correct.

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?

States a specific verb (Execute) and resource (SageMath code), and distinguishes itself from the non-streaming sibling evaluate_sage by describing intermediate print() streaming. It does not name the sibling explicitly, but the streaming behavior is a clear differentiator.

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?

No explicit guidance on when to use this tool versus evaluate_sage or other siblings. The streaming behavior implies a use case, but there is no when-to-use/when-not-to-use instruction or named alternative.

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