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 exampleocr, 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:modelselects the provider. Pass"provider"or"provider/model", for example"firecrawl"or"amazon". Call thelist_modelstool 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_filefirst 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-runningin their description. Poll withcheck_jobuntilstatusissuccessorfail.
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: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.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 toocr with no upload step.
For local files, call upload_file once and reuse the returned ID across as many tools as you like:
expires_in_days. Uploading through the REST API instead keeps a file for 7 days unless you ask for longer.
Polling Long-Running Tools
Async tools hand back a job ID. Poll it withcheck_job:
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 whosecapabilities.supports_function_calling is true can use the MCP tools. Filter the model catalog to find them:
Best Practices
- Echo back only the fields in the spec. Gateway responses can carry non-standard extras on
tool_calls, such as anindexfield. Sending those back on the next turn is rejected by strict providers. Rebuild minimal{id, type, function: {name, arguments}}objects, and use""rather thannullfor 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
isErrorset 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_fileremoves 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