Skip to main content
Glama

search_freeform

Read-only

Run an arbitrary READ-ONLY SQL query (SELECT / WITH) against the tenant database when no curated find_* tool fits — custom aggregations, multi-table joins, GROUP BY, distinct counts. Read-only role is enforced; writes are rejected. Always include an explicit LIMIT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA single SELECT or WITH statement. Read-only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is partly covered; the description adds genuinely new facts — that a read-only DB role is enforced and writes are rejected at the server, and that callers should supply an explicit LIMIT. It does not mention result caps, timeouts, or truncation behavior, which would matter for an arbitrary query tool.

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?

One dense passage, front-loaded with what the tool does and the read-only constraint, then the routing condition, then the LIMIT advice. Every clause carries information; nothing is restated from the schema or annotations.

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 single-parameter query tool with no output schema, the description covers capability, safety enforcement, and routing. It would be fully complete with a note on result shape or row/size limits, since an agent authoring arbitrary SQL benefits from knowing what comes back.

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?

Only one parameter with 100% schema description coverage, so the baseline is 3. The description compensates by adding the constraint that the statement must be a single SELECT or WITH and by instructing callers to include an explicit LIMIT — guidance the schema does not provide.

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?

States a specific verb (Run), resource (an arbitrary READ-ONLY SQL query / SELECT / WITH) and scope (against the tenant database), and explicitly positions itself against the curated find_* family. An agent can identify this as the escape hatch for custom SQL without opening the schema.

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?

Gives a clear triggering condition ('when no curated find_* tool fits') and enumerates the kinds of queries it is for (aggregations, joins, GROUP BY, distinct counts). It does not, however, distinguish itself from the other SQL-capable siblings in the list (run_sql, dispatch_query, list_distinct_values), which an agent could reasonably confuse with this tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.