Skip to content

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

  1. Execute the request successfully in API Workspace.
  2. Replace deploy-specific values with {{environment_variable}} references.
  3. Confirm the request contains no hard-coded secret.
  4. Give the request a clear collection and request name.

Export steps

  1. Open the request and select Export as AI Tool.
  2. Add a concise tool name and an action-oriented description. The LLM uses these fields to decide when the tool is appropriate.
  3. Choose a category to improve discovery in the tool registry.
  4. Review detected {{variables}}. Expose only values the model should supply as tool parameters; keep credentials and infrastructure values resolved by the environment.
  5. Review the generated tool definition, retry behavior, and redaction rules.
  6. Export the tool.

The tool appears under its source collection in AI Workspace.

Parameter design guidance

  • Use stable, descriptive names such as customer_id, not value1.
  • 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.

Released under the MIT License.