Skip to main content
Glama

functiongraph__CancelAsyncInvocation

Stops a specified asynchronous FunctionGraph invocation request by request ID, enabling forced cancellation for supported function configurations.

Instructions

[FUNCTIONGRAPH] -| 当前仅支持参数recursive为false且force为true的函数。 在1:N的函数做并发异步调用的场景下调用停止异步请求接口时,同一函数实例同时在执行的其他请求也会被一并停止并返回4208 function invocation canceled

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": {
      "function_urn": "<function_urn>",
      "project_id": "<project_id>",
      "request_id": "<request_id>"
    },
    "name": "functiongraph__CancelAsyncInvocation"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeNo停止的类型
project_idYes租户项目 ID,获取方式请参见[获取项目ID](functiongraph_06_0260.xml)。
request_idYes被停止的请求id
function_urnYes函数的URN,详细解释见FunctionGraph函数模型的描述。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose a valuable non-obvious consequence: in 1:N concurrent async scenarios, other in-flight requests on the same function instance are also stopped and return 4208 function invocation canceled. However, it says nothing about permissions, reversibility, or the response, so it is only partially transparent for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The text is short, but it opens with a dangling clause ('当前仅支持参数recursive为false且force为true的函数。') whose subject is unstated, and it leads with the '[FUNCTIONGRAPH] -|' prefix rather than the action. The warning content is dense and useful, but the structure buries the purpose behind a constraint fragment.

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

Completeness3/5

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

For a four-parameter cancel operation with no annotations and no output schema, the definition covers the key caveat and the supported parameter combination, but leaves the return value and failure modes other than 4208 undocumented. It is adequate but not complete for a destructive-style operation.

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?

Schema coverage is 100%, so the baseline is 3. The description goes beyond the schema's bare 'force'/'recursive' enum by stating that only the recursive=false plus force=true combination is currently supported, which meaningfully constrains parameter choice; it adds nothing for function_urn, project_id, or request_id, but the schema already documents those.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description refers to '停止异步请求接口' (the stop-async-request interface), which combined with the name makes the resource and operation inferable, but it never states plainly that this cancels a specific async invocation. The bulk of the text is a precondition and a side-effect warning rather than a purpose statement, so an agent must lean on the tool name to know what it does.

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

Usage Guidelines3/5

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

It supplies a hard applicability rule: only functions with recursive=false and force=true are currently supported. That is genuinely useful when-to-use guidance, but it gives no routing advice versus siblings such as ListActiveAsyncInvocations or DeleteFunctionAsyncInvokeConfig, and no prerequisites beyond the parameter constraint.

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

Deploy Server

Other Tools