Code tools
The gateway serves two tools over the Model Context Protocol that let an editor’s agent search the code of the developer’s team and follow what uses what. They read the repositories the tenant indexed as code sources. This page is the tools’ contract, for anyone connecting a client that is not one of the editors the console configures. For Continue and Cline, the console writes the configuration for you: see Connect your editor.
Endpoint
Section titled “Endpoint”POST https://<your-gateway-host>/mcpAuthorization: Bearer <developer-key>Content-Type: application/jsonAccept: application/json, text/event-stream- Transport: streamable HTTP, JSON-RPC 2.0. The server is stateless: it issues no session and answers each request on its own. Responses are plain JSON.
- Server name:
olympus-codebase. - Credential: a developer key, minted by a developer on the Code Assistant page, in
Authorization: Bearerorx-api-key. See Developer keys. - What it reaches: the repositories mapped to the key’s team, in the key’s tenant.
| Refusal | Cause |
|---|---|
403 ide_key_required |
The key is an application key. Mint a developer key. |
403 code_assistant_disabled |
The tenant’s Code Assistant is off. |
401 codes |
As for any gateway call. See Errors. |
Tool calls are not metered in tokens, because no model is called; the model that reads the results is the editor’s, and its calls are metered as usual.
The tools
Section titled “The tools”search_codebase
Section titled “search_codebase”Finds the functions, types and files that best match a question. Each match carries its repository path, symbol, lines, a link to the code host, and the code itself.
| Argument | Type | Rules |
|---|---|---|
query |
string | Required. A symbol name, an error message, or a plain-language description. 1 to 4,000 characters. |
top_k |
integer | How many matches. 1 to 20; 8 by default. |
find_usages
Section titled “find_usages”Lists what uses a file, function, method or type (what calls, imports or inherits it), or with direction set to uses, what it uses.
| Argument | Type | Rules |
|---|---|---|
path |
string | Required. The file’s path as search_codebase shows it, with or without the repository in front. At most 1,000 characters. |
symbol |
string | A function, method or type in that file, such as Server.Foo or Foo. Leave out for the whole file. At most 300 characters. |
repository |
string | The repository as search_codebase shows it (group/name), when the path is in several. |
direction |
string | used_by (the default) or uses. |
steps |
integer | How far out to follow: 1 is direct uses, up to 3. 1 by default. |
One answer lists at most 500 code elements. Both tools are read-only.
Arguments that break these rules are answered as a tool error (isError: true) that says what was wrong, so the calling model can correct itself. One tool call has 30 seconds. A request body is at most 1 MiB.
Example
Section titled “Example”List the tools:
curl -s https://<your-gateway-host>/mcp \ -H "Authorization: Bearer $OLYMPUS_DEV_KEY" \ -H 'content-type: application/json' \ -H 'accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Call search_codebase:
curl -s https://<your-gateway-host>/mcp \ -H "Authorization: Bearer $OLYMPUS_DEV_KEY" \ -H 'content-type: application/json' \ -H 'accept: application/json, text/event-stream' \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/call", "params":{"name":"search_codebase","arguments":{"query":"where are refunds approved","top_k":5}}}'A client library for the protocol performs the initialize handshake before these calls; the server accepts it and keeps no session.