Skip to main content
Glama

List saved queries

list_queries
Read-only

List the saved queries you can see: your own plus the ones shared with the company, each with its id, name, SQL, connectionId, folder and declared {{variables}}. Check here before writing new SQL, since the team may already have a query that answers the question; pass its id to run_saved_query, get_query or create_schedule. Read-only, takes no parameters.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_queries"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
queriesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / properties / queries / items / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / queries / items / properties / variables / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": true,
      -      "properties": {
      -        "name": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        },
      -        "type": {
      -          "type": [
      -            "string",
      -            "null"
      -          ]
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "name": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "type": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so 'Read-only, takes no parameters' largely restates structured data. However, the description adds real behavioral context beyond annotations: the visibility model (own queries plus company-shared ones), which explains why results may differ between users, and the presence of declared {{variables}} in each row.

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?

Two dense sentences with zero filler: the first defines scope and payload, the second gives the usage trigger and the follow-on calls. The most decision-relevant information (what you get, when to call it) is front-loaded.

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?

An output schema exists and the description summarizes the row shape anyway, so no return-value ambiguity remains. For a no-parameter read tool with annotation coverage, everything an agent needs to decide to call it and to use the result is present.

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 tool takes zero parameters and the description states so explicitly ('takes no parameters'), matching the empty schema and eliminating any search for a filter argument. Baseline 4 applies for a parameterless tool; there is no additional parameter nuance to add.

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?

Specific verb and resource ('List the saved queries') combined with an explicit visibility scope ('your own plus the ones shared with the company') and an enumeration of the fields returned (id, name, SQL, connectionId, folder, {{variables}}). This clearly separates it from get_query (single query) and list_connections in the sibling set.

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?

Gives an explicit trigger ('Check here before writing new SQL, since the team may already have a query that answers the question') and names exactly which downstream tools to hand the resulting id to (run_saved_query, get_query, create_schedule). Nothing is left to inference.

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.

Resources