Skip to main content
Glama

cancel_intent

Cancel a procurement intent in PENDING or SOURCING status by submitting its unique intent ID.

Instructions

取消采购意图。只能取消 PENDING 或 SOURCING 状态的意图。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
intent_idYes意图 ID

Implementation Reference

  • Handler case for 'cancel_intent' - parses args with IntentIdSchema and calls client.cancelIntent()
    case 'cancel_intent': {
      const p = S.IntentIdSchema.parse(args);
      result = await client.cancelIntent(p.intent_id);
      break;
  • Zod schema for the cancel_intent input - validates intent_id as positive integer
    export const IntentIdSchema = z.object({
      intent_id: z.number().int().positive(),
    });
  • src/index.ts:323-333 (registration)
    Tool registration with name 'cancel_intent', description, and inputSchema requiring intent_id
    {
      name: 'cancel_intent',
      description: '取消采购意图。只能取消 PENDING 或 SOURCING 状态的意图。',
      inputSchema: {
        type: 'object' as const,
        properties: {
          intent_id: { type: 'number', description: '意图 ID' },
        },
        required: ['intent_id'],
      },
    },
  • HTTP client method cancelIntent - sends DELETE request to /acap/v1/intents/{intentId}
    async cancelIntent(intentId: number) {
      return this.request('DELETE', `/acap/v1/intents/${intentId}`);
    }
Behavior4/5

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

With no annotations, the description carries the burden. It accurately discloses the cancellation action and the status limitation, providing necessary behavioral context.

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 wasted words. Every sentence adds value: the first states the action, the second provides the constraint.

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 simple tool with one parameter and no output schema, the description covers the core functionality and usage condition completely. No additional details are needed.

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 coverage is 100% for the only parameter (intent_id), and the description adds no extra meaning beyond the schema's '意图 ID'. Baseline for high coverage is 3.

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 clearly states the action (cancel) and the resource (purchase intent), and specifies the valid statuses (PENDING or SOURCING), distinguishing it from sibling tools like publish_intent or get_intent_status.

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 explicitly states when to use (only for PENDING or SOURCING intents), providing clear usage constraints. It does not mention alternatives, but the condition is sufficient guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ggqshuai-hub/a2amarket-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server