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
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | SageMath code to execute | |
| session | No | 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'. | default |
| timeout_seconds | No | Override timeout in seconds |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| latex | No | LaTeX serialization of the result when requested and supported. | |
| result | No | String representation of the expression result if available. | |
| stdout | No | Captured stdout emitted during execution. | |
| elapsed_ms | Yes | Wall-clock execution time in milliseconds. | |
| result_type | Yes |