App Plugin
This is the consolidated skill for interacting with your app's API. It covers all MCP tools and REST endpoints.
Available Tools
| Tool | Access | Description |
|---|---|---|
| echo | free | Echo a message back (connectivity test) |
Usage Pattern
- Check if the MCP server is connected (
.mcp.jsonconfig) - If connected, use MCP tools directly
- If not connected, fall back to REST API calls
- For auth-gated endpoints, include the API key
- For x402-gated endpoints, follow the payment flow
Payment Flow (x402)
For paid tools:
- Call the tool WITHOUT a
paymentparameter - Server returns payment requirements (price, network, pay-to address)
- Present the price to the user and ask for confirmation
- If confirmed and agent has wallet: sign and submit payment
- If no wallet: suggest using an API key or the REST endpoint directly
Error Handling
If a tool call fails:
- Check the error code and message
- Present the
suggestionfield to the user - If MCP is unavailable, fall back to REST