Skip to main content
Glama
semlayer MCP server

semlayer MCP server

cancel_infer

Idempotent

Stops a running inference at the next stage and returns immediately with a cancelling status; check status to confirm when the run ends.

Instructions

Stop the inference that is running. Takes effect at the next stage.

    Call it when the user asks to stop a run `infer` started. It returns
    immediately with `cancelling`, because a run cannot be interrupted
    mid-stage; call `status` to see it end. With no run going it changes
    nothing and returns status with an `error` saying so.
    

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cancel_infer"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Goes well past the annotations: it discloses that cancellation is asynchronous and stage-granular ('Takes effect at the next stage'), that the call returns immediately with `cancelling` rather than blocking, and that a no-run invocation is a benign no-op returning an error status. These are exactly the behaviors an agent cannot infer from readOnlyHint/openWorldHint/idempotentHint/destructiveHint.

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?

Front-loads the operation, then the trigger, then the return/asynchrony caveat, then the edge case. Every sentence carries distinct information; nothing is redundant with the schema or annotations.

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?

Complete relative to a zero-param, non-destructive mutation, even accounting for the presence of an output schema. It covers trigger, async semantics, expected immediate return, follow-up tool, and failure/no-op behavior -- all an agent needs to call it correctly.

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

Parameters5/5

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

The tool takes zero parameters, so there is nothing for the description to disambiguate; the baseline for a 0-param schema is 4, and the description adds relevant operational framing on top of it.

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?

States a specific verb and resource -- 'Stop the inference that is running' -- and ties it to a particular run ('a run `infer` started'), which distinguishes it from `infer` itself and from `status`. An agent can identify the operation without opening any schema.

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

Usage Guidelines5/5

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

Gives an explicit trigger ('Call it when the user asks to stop a run `infer` started'), an explicit no-op condition ('With no run going it changes nothing'), and names the sibling to use for observing the outcome ('call `status` to see it end'). When, when-not, and alternatives are all present.

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