Skip to main content
Eden AI’s expert models are exposed as tools on a hosted Model Context Protocol server. OCR, web search, image analysis, speech, translation and the rest of the catalog become callable tools for any MCP client or agent loop, with no server to run and no per-provider integration work. Pair the server with any function-calling model on the AI Gateway and a text-only model becomes multimodal by composition: the model asks for ocr, your loop runs it against the MCP server, and the extracted text comes back into the conversation.

Endpoint

Every tool call is a normal Eden AI expert model call: it is billed to the key in the Authorization header and appears in your monitoring dashboard. Rate limits and data governance rules apply exactly as they do on the REST API.

Connect an MCP Client

Any MCP-capable client can use the server with the three values above, but the config syntax differs from client to client: the key names, the transport label and the place headers go are all client-specific. These integration guides carry a ready-to-copy block for each: For a client that is not listed, check its MCP documentation for how it declares a remote streamable-HTTP server with custom headers. If your client cannot consume MCP at all, you can still use the tools by driving the loop yourself: see Give the Tools to Any LLM.

Tool Catalog

The server publishes one tool per expert model feature, plus three utility tools. The feature tools track the catalog documented in this section, so the AI Features Reference is the live list: OCR, image, text, web, translation, audio and video. Tool names follow their feature, for example ocr, web_search, image_generation and translation_automatic_translation. Every tool carries a JSON Schema for its parameters, so a client discovers the catalog at runtime rather than hardcoding it. Ask the server what it has:

Shared Conventions

Every feature tool follows the same three rules:
  • model selects the provider. Pass "provider" or "provider/model", for example "firecrawl" or "amazon". Call the list_models tool for the exact names, pricing and regions, optionally filtered to one tool with {"tool": "web_search"}.
  • File parameters take a URL or a file ID. If your document already has a public URL, pass it directly. For local content, call upload_file first and pass the returned ID.
  • Long-running tools return a job. Tools for the async features return a job ID immediately instead of a result, and say Long-running in their description. Poll with check_job until status is success or fail.

Give the Tools to Any LLM

You do not need an MCP-aware client. Fetch the catalog, hand the schemas to a model as function-calling tools, and execute the calls the model asks for. The loop below uses the OpenAI SDK against the Eden AI gateway:
The model receives the expert model output as an ordinary tool result and grounds its answer in it. Nothing about the loop is Eden-specific beyond the base URL and the key, so the same code works with any MCP server you already use.

Anthropic SDK

The same pattern works on the gateway’s Anthropic-compatible surface, and the model does not have to be a Claude model. Any function-calling model in the catalog can be driven through this SDK.
On this surface, a custom tool named exactly web_search collides with the provider-native web search feature on some models and the request fails. Register the tool under a different name and map it back when you execute the call, as shown below.

Working With Documents

File parameters accept a public URL directly, so an agent that finds a PDF on the web can pass the link straight to ocr with no upload step. For local files, call upload_file once and reuse the returned ID across as many tools as you like:
The tool sends a 30-day retention by default and accepts 1 to 30 days in expires_in_days. Uploading through the REST API instead keeps a file for 7 days unless you ask for longer.
When you mention a file ID in a prompt so the model can pass it to a tool itself, put it in a fenced code block. Models occasionally mistranscribe a UUID embedded in plain prose, which produces a confusing 404 from the tool.

Polling Long-Running Tools

Async tools hand back a job ID. Poll it with check_job:
When you expose check_job to a model alongside an async tool, the model handles this polling on its own.

Which Models Can Call the Tools

Any model whose capabilities.supports_function_calling is true can use the MCP tools. Filter the model catalog to find them:
You can also browse models visually in the Eden AI model catalog and filter by capability.
Smaller models sometimes announce a tool call in prose instead of emitting one. If a model narrates (“I will search the web for that”) without producing a tool call, a more capable model usually fixes it.

Best Practices

  • Echo back only the fields in the spec. Gateway responses can carry non-standard extras on tool_calls, such as an index field. Sending those back on the next turn is rejected by strict providers. Rebuild minimal {id, type, function: {name, arguments}} objects, and use "" rather than null for the assistant message content.
  • Cap the size of tool results. OCR and scraping output can be very large. Truncating to roughly 20,000 characters before appending to the conversation keeps the context manageable without losing the useful part.
  • Treat tool errors as results, not exceptions. A failed tool call comes back with isError set rather than raising. Pass the error text to the model and it will usually retry with corrected arguments.
  • Filter the catalog before sending it. The full catalog is a lot of schema for one prompt. Send only the tools the task needs, which improves both accuracy and cost.
  • Use URLs when you have them. Skipping upload_file removes a round trip and a class of transcription errors.

Next Steps

OCR

Extract text from documents and images

Web Search

Search the web and get ranked results

List Expert Models

Browse every provider and model available

Monitoring

Track the cost of your tool calls