GunSpec

Alle 39 Einzel-Tools

Look up an API operation

  • gunspec_api_operation
  • Explorer
  • Nur lesend

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.

Anwendungsbeispiel

  1. 1

    Eine Person fragt

    • What parameters does the GunSpec endpoint for a single firearm take, and what errors can it return?
  2. 2

    Der Assistent ruft das Tool auf

    tools/call
    json
    {  "name": "gunspec_api_operation",  "arguments": {    "path": "/v1/firearms/{id}",    "method": "GET"  }}
  3. 3

    Der Server antwortet

    Ergebnis
    json
    {  "matched": "exact",  "specVersion": "1.1.0",  "operations": [    {      "method": "GET",      "path": "/v1/firearms/{id}",      "title": "Get Firearm",      "description": "Returns the full specification for a single firearm, including its manufacturer, category, calibers, images, and known users.",      "tier": "builder",      "auth": "required",      "cacheable": true,      "docsUrl": "https://docs.gunspec.io/en/api/firearms/detail",      "parameters": [        {          "name": "id",          "in": "path",          "type": "string",          "required": true,          "description": "Resource slug ID",          "accepts": null,          "default": null,          "minimum": null,          "maximum": null        },        {          "name": "If-None-Match",          "in": "header",          "type": "string",          "required": false,          "description": "The `ETag` from a previous response. If the body would be byte-identical, the API answers `304 Not Modified` with no body. A 304 counts toward the per-minute rate limit but not the daily request allowance.",          "accepts": null,          "default": null,          "minimum": null,          "maximum": null        }      ],      "requestBody": null,      "success": {        "status": 200,        "contentType": "application/json"      },      "errors": [        {          "status": 400,          "message": "Validation error",          "code": "VALIDATION_ERROR",          "reasons": [            "INVALID_PARAMETER",            "INVALID_JSON",            "INVALID_REQUEST"          ]        },        {          "status": 401,          "message": "API key required",          "code": "UNAUTHORIZED",          "reasons": [            "AUTH_REQUIRED",            "KEY_MISSING",            "KEY_INVALID"          ]        },        {          "status": 403,          "message": "Valid key, not permitted",          "code": "FORBIDDEN",          "reasons": [            "PLAN_REQUIRED",            "ACCOUNT_SUSPENDED",            "KEY_ON_HOLD"          ]        }      ],      "notes": [        "Requires an API key with **Builder** tier or higher.",        "`alternateNames`, `firingModes`, `safetyMechanisms`, `features`, `feedSystems`, `sources`, `conflicts` and `productionNumbers` are arrays and objects, not strings. They were served as JSON text and had to be parsed by the caller; a cell tha…",        "`conflicts` contains objects with `name`, `years`, and `sides` (array of belligerent strings)."      ],      "sampleLanguages": [        "curl",        "javascript",        "python"      ],      "sdk": [        {          "typescript": "client.firearms.get(id)",          "python": "client.firearms.get(id: str)"        }      ]    }  ]}

    Am 22. Okt. 2026 von der Live-API erfasst. Listen und lange Texte sind für die Anzeige gekürzt.

Zugehörige Referenzen

Argumente

  • stringerforderlich

    The endpoint path, e.g. "/v1/firearms/{id}", "/v1/firearms/glock-g17" or a full URL.

    Gesendet als
    ?path=
  • string

    HTTP method, when the path answers more than one.

    Akzeptiert
    Gesendet als
    ?method=

Jedes Argument wird als der angegebene Parameter an GET /v1/docs/operations gesendet. Dieselbe Anfrage lässt sich also mit deinem Schlüssel direkt an die API stellen, wenn du bestimmen möchtest, was zurückkommt.

json