Tools
Get a verified code sample
- 1
A person asks
- Show me how to list firearms from the GunSpec API in Python.
- 2
The assistant calls the tool
tools/calljson{ "name": "gunspec_code_sample", "arguments": { "path": "/v1/firearms", "method": "GET", "language": "python" }} - 3
The server answers
Resultjson{ "method": "GET", "path": "/v1/firearms", "tier": "explorer", "docsUrl": "https://docs.gunspec.io/en/api/firearms/list", "language": "python", "keyNote": "Replace your_key with a GunSpec API key, sent as the X-API-Key header (Authorization: Bearer also works).", "samples": [ { "label": "Python (requests)", "code": "import requests\n\nheaders = {\"X-API-Key\": \"your_key\"}\nres = requests.get(\"https://api.gunspec.io/v1/firearms?category=pistol\", headers=headers)\ndata = res.json()[\"data\"]\nprint(data)", "verification": { "status": "passed", "checkKind": "executed", "ranAt": "2026-10-19T09:23:32.942Z" }, "note": null } ]}Captured from the live API on Oct 22, 2026.