Skip to main content
Glama
cocaxcode

@cocaxcode/database-mcp

by cocaxcode

inspect_last_query

Retrieve the complete, untruncated result of a previous database query using its call_id, or get the most recent query result without re-executing the SQL.

Instructions

Recupera el result completo (sin celdas truncadas, sin row cap) de un execute_query / execute_mutation / explain_query previo. Usa el call_id que aparece en la response comprimida. Sin call_id devuelve el más reciente. NO re-ejecuta el SQL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
call_idNoID devuelto en el campo 'call_id' de un result comprimido. Si se omite, devuelve el último query guardado (warning si hay varios en los últimos 5s).
Behavior4/5

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

With no annotations provided, the description carries the full burden. It explicitly states that it does not re-execute SQL, returns full results without truncation or row caps, and handles missing call_id by returning the most recent. It also implies a warning behavior via the parameter description. This is excellent behavioral disclosure beyond what the schema offers.

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 two concise sentences, front-loaded with the main purpose and key behavioral notes. Every sentence adds value with zero wasted words.

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 simplicity (one optional parameter, no output schema), the description is sufficiently complete. It covers purpose, usage, and key behavioral notes. It could benefit from a brief note on the return format, but since it's about retrieving a stored result, the expectation is clear. The low complexity does not demand more.

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

Parameters4/5

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

The schema already covers the call_id parameter with a description, but the tool description adds essential context: that the call_id comes from a compressed response, and the behavior when omitted. This goes beyond the schema's description and clarifies the purpose of the parameter.

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 retrieves the complete result of a previous execute_query, execute_mutation, or explain_query, with explicit mention that it does not re-execute SQL. This clearly distinguishes it from sibling execution tools like execute_query, execute_mutation, and explain_query, which actually execute queries.

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 provides clear usage context: use the call_id from the compressed response, and if omitted it returns the most recent query. It also warns about multiple queries in the last 5 seconds. However, it does not explicitly state when not to use this tool or mention alternative tools (e.g., for re-executing), but the context is sufficient.

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/cocaxcode/database-mcp'

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