Skip to main content
Glama
ssh-sftp-mcp

ssh-sftp-mcp

by endjoker

sftp_transfer_cancel

DestructiveIdempotent

Stops an in-flight SFTP transfer and requires polling until cleanup finishes. Cancellation is not guaranteed once publishing starts, so verify the final transfer state.

Instructions

Cancels an in-flight transfer; keep polling until cleanup finishes. Once publishing has started the cancel cannot be guaranteed, so check the final state.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "transferId": "<transferId>"
    },
    "name": "sftp_transfer_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
transferIdYes

Output Schema

NameRequiredDescriptionDefault
errorNo
phaseYes
stateYes
resultNo
endedAtYes
directionYes
startedAtYes
totalBytesYes
transferIdYes
targetStateYes
tempCleanedYes
connectionIdYes
bytesVerifiedYes
bytesTransferredYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description adds meaningful behavior beyond that: cancellation is not guaranteed after publishing begins, cleanup is asynchronous, and the caller must verify the final state. That partial-failure semantics is exactly the kind of context annotations cannot express.

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 sentences, no filler, with the core action front-loaded and the caveat about publishing following immediately. Every clause carries information an agent needs.

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?

With an output schema present, return values need not be explained, and the description covers the async cleanup and non-guaranteed-cancel edge cases that matter most. It is essentially complete for a one-parameter cancel operation, lacking only explicit guidance on which polling tool to use next.

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 0%, so the description should compensate, and it does not describe transferId at all. Mitigating that, there is only one parameter and its name plus required status make its meaning self-evident; a 3 reflects adequacy without added value.

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?

The description opens with a specific verb and resource: 'Cancels an in-flight transfer,' which unambiguously identifies the operation. It does not explicitly differentiate itself from siblings like ssh_task_cancel, but the 'transfer' framing plus the transferId parameter makes the target domain clear.

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?

It gives real usage context: call this on an in-flight transfer, then keep polling until cleanup finishes, and be aware cancel may not succeed once publishing has started. It stops short of naming the polling tool or stating when not to call it at all, so it is clear but not exhaustive.

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