AI Glot websiteOpen AI Glot
Operate AI GlotMCP Code Mode
Operate AI Glot

MCP Code Mode

Use AI Glot's search-and-execute MCP server for bounded multi-step API work inside a network-isolated Cloudflare Worker sandbox.

Code Mode exposes two tools at https://mcp.ai-glot.com/mcp/code:

  • search finds relevant operations in the OpenAPI contract without loading the complete specification into the model’s context.
  • execute runs one JavaScript program whose request() function calls the normal AI Glot REST routes.

Why use it

The standard server may require several model-tool round trips for a multi-step task. Code Mode lets the agent fetch several pages, filter them and return a small summary in one tool call.

Example execute program
const first = await request({
  method: 'GET',
  path: '/batches',
  query: { status: 'completed', limit: 100 },
});

return first.data
  .filter(batch => !batch.archived)
  .slice(0, 10)
  .map(({ id, name, completed_at }) => ({ id, name, completed_at }));

Paths passed to request() are relative to /v1. Every call travels through the same route matching, validation, scope enforcement, workspace isolation and rate limiting as a direct HTTP request.

Sandbox boundaries

The program has no outbound network, environment bindings or extra modules. It can only call AI Glot through request() using the connection’s existing scopes.

LimitValue
Program size64 KB
Execution time30 seconds
API requests per execution100
Returned JSON256 KB
Console output200 lines / 32 KB

Each internal request counts against the credential’s normal API rate limit. Large results are explicitly marked as truncated; filter or summarise inside the program rather than returning raw pages.

Use these docs with your AI tools

An AI agent can read this documentation directly. You do not need an account or an API key. Everything here is public and read-only.

Query these docs via MCP

Recommended

Add this server to Claude, Claude Code, Cursor, Mistral, or any tool that supports MCP. Your agent can then search AI Glot Docs documentation and read it in full, instead of answering from memory.

https://ai-glot.com/docs/mcp
  • searchFind the passages that answer a question.
  • fetchRead one page in full, as Markdown.
  • list_pagesSee every page in this documentation.

Query these docs over HTTP

The same tools also work as plain web requests. Use this for scripts, or for any tool that does not support MCP. There is one endpoint per tool. Arguments go in the query string, and the answer comes back as JSON.

https://ai-glot.com/docs/api/docs/search?query=custom+domain

Read the OpenAPI description. It is built from the same definitions as the tools, so it always matches what the endpoints do.

Read these docs as Markdown

Add .md to any page URL to get its Markdown source. You can also send the headerAccept: text/markdown to the page URL itself.

To read the whole documentation in one file, open llms-full.txt. For a short index of every page, open llms.txt.