Skip to main content
Glama
youngsu-Kim

macaulay2-mcp

by youngsu-Kim

m2_interrupt

Stop a long-running Macaulay2 computation with a software interrupt, preserving completed statements and returning an 'error: interrupted' message. Harmless if nothing is running.

Instructions

Interrupt the Macaulay2 computation currently running in the session.

Use this when the user wants to cancel or stop a long-running m2_evaluate. It sends a software interrupt (SIGINT), which M2 handles at safe checkpoints: the running m2_evaluate call returns with an "error: interrupted" message, and everything defined by statements that completed BEFORE the interrupted one stays available — the session does not restart.

If nothing is running, this is a harmless no-op. In the rare case of a computation that ignores the interrupt (deep engine loops), the running m2_evaluate's own timeout_s remains the backstop: it kills and restarts the kernel on expiry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it does exceptionally well. It discloses the SIGINT mechanism, safe-checkpoint handling, the returned error message, preservation of completed statements, the no-op behavior when nothing is running, and the timeout backstop that kills and restarts the kernel. This is comprehensive behavioral disclosure.

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 front-loaded with the core purpose, then covers usage, behavior, edge cases, and fallback behavior in a compact way. Every sentence adds meaningful information without redundancy.

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

Completeness5/5

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

For a zero-parameter interrupt tool with no annotations, the description is fully complete. It covers the normal case, the no-op case, the failure case, and the session-state implications, leaving an agent with everything needed to invoke and predict the outcome. An output schema exists, so return-value details need not be spelled out here.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the input schema is complete and there is no parameter semantics for the description to add. The baseline of 4 applies because no compensation is needed.

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 opens with a specific verb and resource: 'Interrupt the Macaulay2 computation currently running in the session.' It is immediately clear what the tool does and how it differs from siblings like m2_evaluate or m2_session_reset.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use it: 'Use this when the user wants to cancel or stop a long-running m2_evaluate.' It also clarifies the no-op case. It does not explicitly name alternative tools or say when not to use it, but the usage context is clear enough.

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