Skip to main content
Glama

chat_with_agent

Send a message to an AI agent and receive the complete response in a single synchronous call. Include a session_id from prior calls to keep conversation context.

Instructions

Envia uma mensagem a um agente e recebe a resposta completa (síncrono — sem streaming progressivo). O agente usa todas as tools configuradas (api_config, db_config, MCP externo).

Resposta inclui: response (texto), session_id (manter para contexto), tools_used (nomes), tool_calls (detalhes com name, duration_ms, success), execution_time_ms, model_used, execution_id (correlação com get_execution_diagnostics). Turno que estoura o deadline do runtime retorna erro TURN_TIMEOUT com execution_id e session_id — a execução fica registrada e a sessão pode ser retomada.

IMPORTANTE: use o session_id retornado nas próximas mensagens para manter o contexto da conversa.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesMensagem para enviar ao agente
agent_idYesUUID do agente
session_idNoID da sessão retornado por uma chamada anterior. Envie para manter contexto. Omita na primeira mensagem.
Install Server

TDQS

A4.1/5.0
Behavior5/5

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

The description goes far beyond annotations, disclosing synchronous execution, no progressive streaming, use of all configured tools, detailed response fields, timeout error semantics (TURN_TIMEOUT), execution_id correlation with get_execution_diagnostics, and resumability after a timeout. This is rich behavioral context that annotations alone do not convey.

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 well-structured and front-loaded with the core action, then uses line breaks to enumerate response contents and the important session_id guidance. Every sentence adds useful information—no filler, no repetition of schema details already covered.

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

Completeness5/5

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

Given there is no output schema, the description compensates well by enumerating the response fields, explaining timeout behavior, and telling the agent how to correlate executions and maintain session context. For a synchronous agent-chat tool with moderate complexity, this is complete enough to invoke correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters and their semantics. The description reinforces the session_id behavior ('use o session_id retornado nas próximas mensagens para manter o contexto') but does not add significant new parameter-level meaning beyond what the input schema already states.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb+resource: 'Envia uma mensagem a um agente e recebe a resposta completa'. It also differentiates itself by noting the synchronous nature and absence of streaming. However, it does not explicitly distinguish itself from the sibling tool 'send_manual_message', which appears to serve a similar chat/send-message role.

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 gives clear context about how to maintain conversation state by reusing the returned session_id, and it explains timeout/resume behavior. But it does not provide explicit when-to-use vs. when-not-to-use guidance or name any alternative tools, such as send_manual_message, so the agent must infer when this is the right choice.

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

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/zihin-ai/zihin-mcp'

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