> For the complete documentation index, see [llms.txt](https://shinkalabs.gitbook.io/hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shinkalabs.gitbook.io/hub/andromeda/mcp-reference/examples.md).

# Examples

A few example agent flows over MCP. These describe what an agent does with the tools; the tools themselves are the [REST operations](/hub/andromeda/api-reference/overview.md) under another surface.

## Sign a message

1. The agent calls the **sign** tool with the dWallet address and a 32-byte message hash.
2. It gets back a raw signature and the scheme.
3. It assembles the destination-chain transaction with the signature and broadcasts it (using whatever chain client the agent has).

## Run a recovery

1. The agent calls the **primary recovery challenge** tool with the dWallet address and the message hash. It gets `challengeBase64` and `expectedNonce`.
2. It asks the user to sign the 32-byte challenge with their primary credential (a wallet, a passkey).
3. It calls the **primary recovery submit** tool with the signature and the nonce. Andromeda pays the gas and submits. The agent reports the transaction signature.

For a quorum, the agent opens a session, collects each member's signature over their own challenge, contributes them, then finalizes. See [Run a recovery](/hub/andromeda/guides/run-recovery.md).

## Deploy a policy

1. The agent calls the **preview** tool for the chosen template with the configuration, and shows the user the resolved settings and the PDA.
2. On approval, it calls the **deploy** tool, has the owner sign the returned transaction, and submits it.
3. Later it can call the **read** tool to show the current state, or the **admin** tools (challenge then submit) to change it, including the `revoke` action.

## Arm a Future-Sign

1. The agent calls the **future-sign submit** tool to pre-authorise a signature.
2. It registers a trigger (a price condition, a slot, an on-chain event, or an external webhook).
3. Andromeda completes the signature when the trigger fires. If a webhook is registered, the agent's system gets notified.

## Query the audit log

1. The agent calls the **audit log query** tool (needs an `admin`-scoped key) for a time range or event type.
2. It receives the entries plus verification data.
3. It can verify the hash chain and the ed25519 signatures itself, then summarise what happened. See [Audit log](/hub/andromeda/guides/audit-log.md).

## Notes

* Pass an `Idempotency-Key` with mutating tool calls so retries are safe.
* The agent needs a key with the right scope; `admin` for webhooks, audit, policies and future-sign.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shinkalabs.gitbook.io/hub/andromeda/mcp-reference/examples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
