Skip to main content
Glama

gograph_sql

Read-onlyIdempotent

Extract SQL query literals from Go source code with their enclosing function context and file locations. Filter results by keyword or table name to find specific queries.

Instructions

Find all SQL query literals embedded in Go source code, with their enclosing function context and file/line locations. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. Optional term filters by SQL keyword or table name (e.g., "SELECT", "users"). WHEN TO USE: When auditing database interactions, reviewing queries for performance issues, or locating all queries that touch a specific table. NOT TO USE: For ORM struct-to-table mappings (use gograph_schema); for env-based configuration (use gograph_envs). RETURNS: List of SQL string literals with file, line, and enclosing function name; empty when no matches found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termNoOptional SQL keyword or table name to filter database queries (e.g., 'SELECT', 'users')
Behavior4/5

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

Annotations already declare readOnly, destructive, idempotent hints. Description adds that it's read-only with no side effects and describes return type including empty result behavior, which is beyond annotations.

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?

Well-structured with sections (purpose, prerequisite, read-only, WHEN/WHEN NOT, RETURNS). Some redundancy but every sentence is informative. Could be slightly more concise but remains clear.

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?

No output schema, but the description fully explains return type, empty behavior, prerequisite, and usage context. All necessary information for an agent to correctly use the tool is present.

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 coverage is 100% with a clear parameter description. The description repeats and slightly expands (e.g., example values) but does not add significant new meaning beyond the schema.

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 finds SQL query literals in Go source with context and locations. It is specific (verb+resource) and distinguishes from siblings like gograph_schema and gograph_envs.

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

Usage Guidelines5/5

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

Includes explicit WHEN TO USE and NOT TO USE sections with names of alternative tools. Also specifies prerequisite (.gograph/graph.json) and build command.

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/ozgurcd/gograph'

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