Skip to main content
Glama

invoke_model

Send AI requests to a chosen endpoint and model for operations including chat, embedding, image generation, TTS, STT, and rerank, by providing a compatible payload.

Instructions

Forward a request to the selected (endpoint, model).

Args: endpoint: endpoint name registered via the CLI. model: model_id as returned by list_models. operation: one of chat / embedding / image_gen / tts / stt / rerank. payload: upstream-compatible body (OpenAI shape for openai-compat endpoints). The model field is set automatically. The response is passed through verbatim; errors are returned inside error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
payloadYes
endpointYes
operationYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses key behaviors: the `model` field is set automatically, response is passed through verbatim, errors are returned inside `error`. However, it does not mention side effects, idempotency, or rate limits, which would elevate transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short (two sentences plus a bullet-like list of args) with no wasted words. It front-loads the purpose and efficiently conveys essential details about parameters and behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (4 required params, nested objects, output schema present), the description covers purpose, all parameter semantics, and response behavior ('passed through verbatim'). The presence of an output schema reduces the need to describe return values; the description is sufficient for an agent to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must add meaning. It explains each parameter: 'endpoint' is registered via CLI, 'model' from `list_models`, 'operation' enum values (chat, embedding, etc.), and 'payload' is upstream-compatible body with OpenAI shape. This greatly exceeds schema information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Forward a request to the selected (endpoint, model).' It uses a specific verb ('Forward') and resource ('request'), and distinguishes from siblings like 'list_models' by detailing operation types and payload handling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context (requires endpoint and model, operation type) but does not explicitly state when to use this tool versus alternatives like 'model_performance' or 'add_models'. No when-not-to-use guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/brianMacao/ai-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server