Retrieve Code
retrieve_codeRetrieve a stored authorization code (one-time read, auto-deleted).
Called by the originating MCP server to pick up the code after the user has authorized in the browser. Returns the encrypted code which the caller decrypts using the same state token.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"state": "<state>"
},
"name": "retrieve_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | Where the code was filed: patron npub + the flow's secret (the SDK's ``oauth_code_key`` of the authorization state). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||