Skip to main content
Glama

get_most_frequent_queries

Read-only

Identify the most frequently run queries by returning the top N from Couchbase's system:completed_requests catalog.

Instructions

Get the N most frequent queries from the system:completed_requests catalog.

Prefer this over writing a raw system:completed_requests query via run_sql_plus_plus_query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of queries to return (default: 10)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.8.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / limit / description
      Added value: +"Number of queries to return (default: 10)"
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / title
      Removed value: -"get_most_frequent_queriesArguments"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"get_most_frequent_queriesOutput"
    • addedOutput schema / x-fastmcp-wrap-result
      Added value: +true
  2. Addedv1.0.0

TDQS

A4.3/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, covering the operation's safety profile. The description adds the data source and the aggregating nature of the tool, but does not define what 'most frequent' means precisely (e.g., execution count vs. duration) or whether a time window applies.

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 short sentences with the core operation front-loaded and a useful routing hint in the second sentence. There is no redundant or filler content.

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?

For a single optional parameter, read-only annotations, and an existing output schema, the description provides enough context to correctly select and invoke the tool. It names the source catalog and tells the agent when to prefer this tool over the raw query alternative.

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 the single limit parameter fully documented in the schema. The description does not add any syntax or format detail beyond 'N', so baseline 3 is appropriate.

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 states a specific verb ('Get'), a specified resource ('N most frequent queries from the system:completed_requests catalog'), and differentiates from raw SQL querying via run_sql_plus_plus_query. This makes the tool's purpose and scope clear.

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?

The description explicitly tells the agent to prefer this tool over writing a raw system:completed_requests query via run_sql_plus_plus_query. This names the relevant alternative and provides a clear when-to-use directive.

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