request_approval
Request human approval for AI agent actions before execution, providing context and optional callback for decisions.
Instructions
Ask a human to approve or reject an action. Returns an approval ID to poll.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| question | Yes | The question or action to approve | |
| context | No | Additional context for the human reviewer | |
| callback_url | No | Optional URL to notify when decided |
Implementation Reference
- src/index.js:149-156 (handler)The handler logic for request_approval which calls the remote /approve endpoint.
case 'request_approval': result = await call('POST', '/approve', args); return { content: [{ type: 'text', text: `Approval request submitted (ID: ${result.id}). Status: pending.\nPoll with check_approval("${result.id}") to see the human's decision.`, }], }; - src/index.js:80-91 (schema)Definition and input schema for the request_approval tool.
name: 'request_approval', description: 'Ask a human to approve or reject an action. Returns an approval ID to poll.', inputSchema: { type: 'object', properties: { question: { type: 'string', description: 'The question or action to approve' }, context: { type: 'string', description: 'Additional context for the human reviewer' }, callback_url: { type: 'string', description: 'Optional URL to notify when decided' }, }, required: ['question'], }, },