AutomationRpc
AutomationRpc provides local development discovery endpoints for inspecting live RPC contracts at runtime. It can list registered RPC method metadata and return the live request contract for a specific RPC method, but only when application automation discovery is enabled in a local development session.
Endpoints
POST /api/rpc (Method: AutomationRpc.listRpcs)
listRpcs lists live RPC method contracts that match an optional filter and search query. The endpoint validates its request body with a Zod schema and enforces a development-only runtime check before returning any data.
Description: Lists live RPC method contracts for authenticated local browser automation.
Request Body:
{ "method": "AutomationRpc.listRpcs", "params": { "filter": "*", "query": "optional search text", "limit": 500 } }Parameters:
Name Type Required Description filterStringNo Metadata filter passed to the RPC server when collecting method contracts. Defaults to "*".queryStringNo Case-insensitive text filter applied to the method name and description. limitNumberNo Maximum number of entries returned. Must be a positive integer up to 5000. Defaults to500.Response:
{ "success": true, "data": [ { "method": "SomeRpc.someMethod", "description": "Calls SomeRpc.someMethod.", "parameters": { "type": "object", "properties": {} } } ] }Each item in
datahas:method: the RPC method name.description: the documented description for that method, or a generated fallback ofCalls <method>.parameters: a JSON Schema representation of the method's Zod parameter schema when one is available; otherwise an empty object schema.
Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \ -H "Content-Type: application/json" \ -d '{ "method": "AutomationRpc.listRpcs", "params": { "filter": "*", "query": "user", "limit": 25 } }'
POST /api/rpc (Method: AutomationRpc.describeRpc)
describeRpc returns the live parameter contract and description for one RPC method. The method name is required, and the endpoint rejects unknown RPC method names.
Description: Returns the live parameter contract and description for one RPC method.
Request Body:
{ "method": "AutomationRpc.describeRpc", "params": { "method": "SomeRpc.someMethod" } }Parameters:
Name Type Required Description methodStringYes The RPC method name to inspect. Must be a non-empty string. Response:
{ "success": true, "data": { "method": "SomeRpc.someMethod", "description": "Calls SomeRpc.someMethod.", "parameters": { "type": "object", "properties": {} } } }The returned object has the same shape as
AutomationRpc.listRpcsitems:method: the requested RPC method name.description: the documented description for that method, or a generated fallback ofCalls <method>.parameters: a JSON Schema representation of the method's Zod parameter schema when one is available; otherwise an empty object schema.
Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \ -H "Content-Type: application/json" \ -d '{ "method": "AutomationRpc.describeRpc", "params": { "method": "SomeRpc.someMethod" } }'
Behavior Notes
Both endpoints call an internal development guard before reading RPC metadata. If automation discovery is not enabled for the current session, the request fails with the message Application automation discovery is only enabled in local development sessions.
listRpcs performs an in-memory filter over the live metadata set, matching the query value against the method name and description, then sorts results by method name and applies the requested limit.
describeRpc looks up a single RPC method by name and fails with Unknown RPC method '<method>'. when the method is not registered.