Export an API request as an AI tool
KeyRunner tools begin as API requests you can execute and verify. Exporting a request avoids rebuilding the method, URL, authentication, headers, query parameters, and body in a separate agent framework.
Before you export
- Execute the request successfully in API Workspace.
- Replace deploy-specific values with
{{environment_variable}}references. - Confirm the request contains no hard-coded secret.
- Give the request a clear collection and request name.
Export steps
- Open the request and select Export as AI Tool.
- Add a concise tool name and an action-oriented description. The LLM uses these fields to decide when the tool is appropriate.
- Choose a category to improve discovery in the tool registry.
- Review detected
{{variables}}. Expose only values the model should supply as tool parameters; keep credentials and infrastructure values resolved by the environment. - Review the generated tool definition, retry behavior, and redaction rules.
- Export the tool.
The tool appears under its source collection in AI Workspace.
Parameter design guidance
- Use stable, descriptive names such as
customer_id, notvalue1. - Describe expected formats and allowed values.
- Keep credentials out of LLM-controlled parameters.
- Expose the minimum input required for the action.
- Apply redaction to sensitive response fields before production use.
Next steps
Add the tool to a policy, assign the policy to an agent, and integrate that agent using the KeyRunner SDK or MCP endpoint. See Production agent workflow.