Skip to main content
Glama

Query Graph

query_graph
Read-only

Explore graph topology and neighborhoods, trace dependency paths with cycle detection, and run safe read-only SQL or natural language queries.

Instructions

Query graph topology, neighborhoods, dependency paths, and safe read-only SQL queries. Supported actions: subgraph (fetch N-hop neighborhood around root node), trace (trace dependency chain upstream or downstream with cycle detection), raw (execute safe read-only SELECT query against SQLite), natural_language (translate natural language query into graph operations).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlNoRead-only SELECT query for raw action.
depthNoMaximum depth for subgraph query (1-10).
queryNoNatural language search query for natural_language action.
actionNoThe graph query action to execute.
paramsNoQuery parameters for raw action.
node_idNoStarting node ID for trace.
projectNoTarget project name or slug.
root_idNoRoot node ID for subgraph query.
directionNoDirection of dependency traversal for trace.
max_depthNoMaximum traversal depth for trace (1-50).
edge_typesNoAllowed edge types for trace (default: depends_on, blocks, child_of).
Behavior4/5

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

The annotations already declare readOnlyHint and destructiveHint, and the description reinforces the 'safe read-only' nature. It also mentions cycle detection for trace, which adds behavioral detail beyond the annotations. However, it does not describe return formats or potential side effects (though read-only implies none).

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 concise and lists actions clearly, but it is a single sentence that packs many details. It front-loads the purpose and then itemizes actions, which is efficient, though the lack of separate sections might reduce scannability.

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

Completeness3/5

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

The description covers the main actions and parameters reasonably well for a read-only query tool. However, it does not explain when to use specific actions (e.g., subgraph vs trace vs raw) or how they relate to sibling tools. No output schema exists, so return values are not described, which is acceptable per guidelines.

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 covers 100% of parameters with descriptions, but many descriptions are minimal (e.g., 'Query parameters for raw action'). The description provides little additional semantic meaning beyond the schema, and the action parameter's possible values are only listed in the description, not in the schema.

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 queries graph topology, neighborhoods, dependency paths, and safe read-only SQL queries, listing specific actions. It names the resource (graph) and the verb (query), but does not explicitly differentiate from sibling tools beyond the read-only aspect.

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 implies usage for graph-related queries and read-only operations, but does not explicitly state when to use this tool versus alternatives like manage_nodes or get_analytics. No exclusions or alternatives are mentioned, though the read-only nature is implied.

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/putervision/state-memory-mcp'

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