Skip to main content
Glama

azeth_guardian_status

Check if a guardian has responded to a pending co-signature request. Use to verify approval status and retrieve signatures for completing operations that require guardian authorization.

Instructions

Check the status of a pending guardian approval request.

Use this when: You previously submitted an operation that required guardian co-signature and received a timeout with a request_id. This tool checks if the guardian has since responded via XMTP.

Status outcomes:

  • "approved": Guardian approved. Returns the guardian signature. Retry your original operation — it will now succeed with the guardian co-signature.

  • "rejected": Guardian rejected with a reason.

  • "pending": Guardian has not responded yet. Check again later.

  • "expired": Request expired after 5 minutes. Retry your original operation.

Returns: Current status and relevant details (signature if approved, reason if rejected).

Example: { "request_id": "abc-123" }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_idYesThe guardian approval request ID returned by a previous operation.
chainNoTarget chain. Defaults to AZETH_CHAIN env var or "baseSepolia". Accepts "base", "baseSepolia", "ethereumSepolia", "ethereum" (and aliases like "base-sepolia", "eth-sepolia", "sepolia", "eth", "mainnet").

Implementation Reference

  • The handler function for 'azeth_guardian_status' tool, which checks the status of a guardian approval request, either from local memory or by querying XMTP messages for a response.
      async (args) => {
        let client;
        try {
          // Check in-memory pending approvals store first
          const pending = getPendingApproval(args.request_id);
    
          if (!pending) {
            return error(
              'SERVICE_NOT_FOUND',
              `No guardian approval request found with ID "${args.request_id}". ` +
              'The request may have been made in a different process or session.',
              'Guardian approval state is stored in-memory per process. If the MCP server restarted, the request state is lost. Retry the original operation.',
            );
          }
    
          if (pending.status === 'expired') {
            return success({
              requestId: args.request_id,
              status: 'expired',
              message: 'Request expired after 5 minutes. Retry your original operation to send a new approval request.',
              operation: pending.operation,
            });
          }
    
          if (pending.status === 'approved') {
            const combinedSignature = (pending.ownerSignature + pending.guardianSignature!.slice(2)) as `0x${string}`;
            return success({
              requestId: args.request_id,
              status: 'approved',
              message: 'Guardian approved! Retry your original operation — it will succeed with the guardian co-signature.',
              guardianSignature: pending.guardianSignature,
              combinedSignature,
              operation: pending.operation,
            });
          }
    
          if (pending.status === 'rejected') {
            return success({
              requestId: args.request_id,
              status: 'rejected',
              message: `Guardian rejected the request.${pending.rejectionReason ? ` Reason: ${pending.rejectionReason}` : ''}`,
              reason: pending.rejectionReason,
              operation: pending.operation,
            });
          }
    
          // Status is 'pending' — check XMTP for new response
          client = await createClient(args.chain);
    
          const messages = await client.getMessages(pending.guardianAddress, 20);
          for (const msg of messages) {
            if (msg.timestamp < pending.createdAt) continue;
    
            const parsed = tryParseGuardianResponse(msg.content);
            if (parsed && parsed.requestId === args.request_id) {
              if (parsed.decision === 'approved' && parsed.signature) {
                pending.status = 'approved';
                pending.guardianSignature = parsed.signature;
                const combinedSignature = (pending.ownerSignature + parsed.signature.slice(2)) as `0x${string}`;
    
                return success({
                  requestId: args.request_id,
                  status: 'approved',
                  message: 'Guardian approved! Retry your original operation — it will succeed with the guardian co-signature.',
                  guardianSignature: parsed.signature,
                  combinedSignature,
                  operation: pending.operation,
                });
              } else {
                pending.status = 'rejected';
                pending.rejectionReason = parsed.reason;
    
                return success({
                  requestId: args.request_id,
                  status: 'rejected',
                  message: `Guardian rejected the request.${parsed.reason ? ` Reason: ${parsed.reason}` : ''}`,
                  reason: parsed.reason,
                  operation: pending.operation,
                });
              }
            }
          }
    
          // No response yet
          return success({
            requestId: args.request_id,
            status: 'pending',
            message: 'Guardian has not responded yet. Check again later.',
            guardianAddress: pending.guardianAddress,
            operation: pending.operation,
            expiresAt: new Date(pending.expiresAt).toISOString(),
          });
        } catch (err) {
          return handleError(err);
        } finally {
          try { await client?.destroy(); } catch { /* prevent destroy from masking the original error */ }
        }
      },
    );
  • Input schema definition for the 'azeth_guardian_status' tool.
      inputSchema: z.object({
        request_id: z.string().describe('The guardian approval request ID returned by a previous operation.'),
        chain: z.string().optional().describe('Target chain. Defaults to AZETH_CHAIN env var or "baseSepolia". Accepts "base", "baseSepolia", "ethereumSepolia", "ethereum" (and aliases like "base-sepolia", "eth-sepolia", "sepolia", "eth", "mainnet").'),
      }),
    },
  • Tool registration for 'azeth_guardian_status' in the MCP server instance.
    'azeth_guardian_status',
Behavior5/5

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

With no annotations provided, the description carries full behavioral disclosure burden and succeeds comprehensively. It documents the XMTP communication mechanism, enumerates all four terminal states (approved/rejected/pending/expired), specifies the 5-minute expiration timeout, and explains corrective actions (retry original operation for approved/expired states).

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?

Well-structured with clear visual hierarchy: purpose declaration, usage trigger, enumerated status outcomes with sub-bullets, return value summary, and example. No redundant text; every section serves a distinct purpose for agent decision-making.

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?

Given no output schema exists, the description compensates by detailing return value semantics ('signature if approved, reason if rejected'). It fully documents the asynchronous guardian approval lifecycle, providing sufficient context for the agent to handle all terminal states appropriately.

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%, establishing baseline 3. The description adds value through a concrete JSON example ('Example: { "request_id": "abc-123" }') demonstrating expected input structure, though it does not elaborate further on parameter semantics beyond the schema definitions.

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 opens with a specific verb-resource pair ('Check the status of a pending guardian approval request') that precisely identifies the tool's function. It clearly distinguishes this from sibling tool 'azeth_guardian_approve' by positioning this as a polling/status-check operation rather than an action submission.

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

Usage Guidelines5/5

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

Contains explicit 'Use this when' clause that precisely defines the prerequisite state (previous timeout with request_id from co-signature operation). This prevents misuse by clarifying this is a follow-up tool, not for initial guardian requests.

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/azeth-protocol/mcp-azeth'

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