Look up an API operation
Returns what the GunSpec API reference documents for an endpoint: its parameters and accepted values, the plan it needs, whether a key is required, caching, every error status with the error.reason values to branch on, and the languages a sample is printed in. Use this tool before writing or explaining code that calls the GunSpec API, instead of recalling parameters. The path may be a template (/v1/firearms/{id}), a concrete path or a URL; a partial path such as /v1/vendor lists the operations under it.
Example usage
- 1
A person asks
- What parameters does the GunSpec endpoint for a single firearm take, and what errors can it return?
- 2
The assistant calls the tool
tools/calljson{ "name": "gunspec_api_operation", "arguments": { "path": "/v1/firearms/{id}", "method": "GET" }} - 3
The server answers
No captured answer is available for this tool yet.
Related references
Arguments
- stringrequired
The endpoint path, e.g. "/v1/firearms/{id}", "/v1/firearms/glock-g17" or a full URL.
- Sent as
- ?path=
- string
HTTP method, when the path answers more than one.
- Accepts
- Sent as
- ?method=
Each argument is sent to GET /v1/docs/operations as the parameter shown, so the same request can be made to the API directly, with your key, if you want to shape what comes back.