Skip to main content
Glama

ask_llm

Call a low-cost LLM with a raw prompt, get JSON with session ID and result file. Pass session ID to resume multi-turn chats while avoiding context bloat and expensive models.

Instructions

Pure text-in/text-out LLM call. No system prompt, no tools, no context. Use this for cheap LLM calls instead of expensive models. Pass model= to select a specific model (default: swe-1-7). Pass session_id= to resume a multi-turn conversation. Returns structured JSON: session_id, result_file (LLM output), log_file, status. Read the result_file to get the LLM's full text answer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel uid or alias (default: swe-1-7). Ignored when resuming a session. Use list_models to discover available models.swe-1-7
promptYesThe raw prompt text to send to the LLM.
session_idNoSession ID to resume a multi-turn conversation. Omit to start a new conversation. The returned session_id can be passed back for subsequent turns.
system_promptNoOptional system prompt. Defaults to a minimal helper prompt.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it discloses that there is no system prompt, no tools, no context, that session resumption is possible, and that the response is a structured JSON with session_id, result_file, log_file, and status. The only slight issue is that 'No system prompt' sits uneasily with the optional system_prompt parameter.

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

Conciseness4/5

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

The description is compact and front-loaded with the core behavior, then moves to usage, parameter hints, and return format. Every sentence contributes useful information, though 'No system prompt' slightly conflicts with the schema and the text-in/text-out idea is repeated in different forms.

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?

For a simple tool with no annotations and no output schema, the description covers the key operational details: model selection, session resumption, return envelope, and how to read the full answer. It does not explain status values or log_file usage, but those are minor for typical calls.

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?

The schema already provides 100% parameter coverage, so the description does not need to explain parameters in depth. It does restate model as passable with a default and session_id for resuming conversations, matching the schema rather than adding new semantic value.

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 performs a pure text-in/text-out LLM call and highlights its simplicity and low cost. It distinguishes this from expensive models and from the sibling list_models/list_sessions tools, leaving no ambiguity about the tool's purpose.

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

Usage Guidelines4/5

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

It explicitly says to use this for cheap LLM calls instead of expensive models, giving clear when-to-use guidance. It does not explicitly name alternative tools or exclusion criteria, but the context and sibling names make the intended usage clear enough.

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

Deploy Server

Other Tools