Skip to content

Variable: AgentToolApproveSchema

Makaio Framework


Makaio Framework / contracts / AgentToolApproveSchema

const AgentToolApproveSchema: object

Defined in: ../../../packages/contracts/src/agent/schemas/tool-approve.ts:19

Request approval for tool execution.

Subject: agent.toolApprove Type: Request (RPC) Emitted when: Agent requires approval before executing a tool

Response semantics:

  • action: 'allow': Approve tool execution
    • updatedInput: Optional modified arguments (e.g., user corrected a path)
    • updatedPermissions: Optional permission updates (e.g., “always allow” this pattern)
  • action: 'deny': Reject tool execution
    • message: Required explanation or guidance for the agent
    • shouldAbort: If true, stop execution entirely; if false/unset, agent may retry

request: ZodObject<{ adapterId: ZodString; adapterName: ZodString; adapterSessionId: ZodString; agentId: ZodString; args: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; clientId: ZodOptional<ZodString>; messageId: ZodOptional<ZodString>; occurredAt: ZodOptional<ZodNumber>; providerConfigId: ZodOptional<ZodString>; reasoning: ZodOptional<ZodString>; sessionId: ZodString; toolCallId: ZodString; toolName: ZodOptional<ZodString>; turnId: ZodOptional<ZodString>; }, $strip>

response: ZodDiscriminatedUnion<[ZodObject<{ action: ZodLiteral<"allow">; updatedInput: ZodOptional<ZodRecord<ZodString, ZodUnknown>>; updatedPermissions: ZodOptional<ZodArray<ZodUnknown>>; }, $strip>, ZodObject<{ action: ZodLiteral<"deny">; message: ZodString; shouldAbort: ZodOptional<ZodBoolean>; }, $strip>], "action">