Server tools API
This page documents the 1 gateway endpoint tagged server tools in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.
| Method | Path | Summary |
|---|---|---|
| GET | /v1/server_tools | List the server tools your key may use |
Endpoints
GET /v1/server_tools
List the server tools your key may use
Lists the tools the gateway runs on its own side, such as fetching a web page, that your key may add to
tools on /chat/completions with a type like spanway:web_fetch. A tool shows up only when a proxy admin
turned it on and it is granted to your key and, for a team key, to your team. Any valid key may call this, and
it changes nothing.
Each entry carries the function schema the model sees and its per-request use limit, and the top level gives the most tool calls and the most seconds one request may spend on server tools.
Docs (https://docs.spanway.ai/docs/proxy/server_tools)
Example request:
curl -X GET "http://localhost:4000/v1/server_tools" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The server tools this key may call, with their limits | application/json ServerToolCatalog |
| 401 | No valid key or Admin UI session was presented | application/json ProxyError |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
tools | array of ServerToolInfo | Yes | Tools |
max_tool_calls | integer | Yes | Max Tool Calls |
max_wall_seconds | integer | Yes | Max Wall Seconds |