ToolDataProviderRpc
ToolDataProviderRpc exposes RPC methods that supply option lists for tool and form dropdowns. In the current file, it contains one public method for retrieving AI agent choices, and it returns a simplified { value, label } array suitable for UI selection controls.
Endpoints
POST /api/rpc (Method: ToolDataProviderRpc.getAvailableAiAgents)
This method retrieves configured AI agents for use in dropdowns. It performs an internal RPC call to fetch agent data, then maps each returned agent into a { value, label } object.
Description: Retrieves a list of configured AI agents for use in dropdowns.
Request Body:
{ "method": "ToolDataProviderRpc.getAvailableAiAgents", "params": {} }Parameters:
Name Type Required Description paramsObjectYes An object matching the declared empty Zod schema. No request fields are defined in the current implementation. Response:
{ "success": true, "data": [ { "value": "agent-name", "label": "agent-name (model-name)" } ] }The method returns an array of dropdown विकल्प objects. Each item contains
valueset to the agent name andlabelset to the agent name followed by the model in parentheses. If the underlying agent lookup fails, the method returns an empty array.Example (cURL):
curl -X POST "${APP_BASE_URL}/api/rpc" \ -H "Content-Type: application/json" \ -d '{ "method": "ToolDataProviderRpc.getAvailableAiAgents", "params": {} }'
Notes
The method does not declare any request fields in its schema. The implementation attempts to load agent data through an internal RPC invocation and logs an error if that lookup fails, but the public contract observed here is only that it returns an array and falls back to [] on error.