Skip to main content
Glama
RushDB MCP Server

RushDB MCP Server

Official
by rush-db

smartSearch

Read-only

Converts a natural-language question into a read-only SQL query over the project schema, runs it, and returns results with the SQL, a short title, and warnings.

Instructions

Convert a natural-language question into one read-only SQL statement over the project schema, run it, and return the results plus the statement, a short title for it and any warnings. Rows that select a record come back as records; aggregates such as counts and totals come back as plain rows. Use this for user-facing questions such as "Who are piloting Falcon?" or "How many orders per city?". For direct vector similarity over an embedding index, use vectorSearch instead.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "smartSearch"
  }
}

Input Schema

NameRequiredDescriptionDefault
skipNoNumber of results to skip for pagination (default 0).
limitNoMaximum number of results to return (at most 1000).
promptYesNatural-language search request to convert into SQL and run.

Output Schema

NameRequiredDescriptionDefault
sqlYes
dataYes
nameNo
totalYes
warningsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv3.2.0
    • removedInput schema / properties / currentQuery
      Removed value: -{
      -  "additionalProperties": true,
      -  "description": "Optional current SearchQuery context from a dashboard/query-builder session.",
      -  "type": "object"
      -}
    • addedInput schema / properties / limit
      Added value: +{
      +  "description": "Maximum number of results to return (at most 1000).",
      +  "type": "number"
      +}
    • changedInput schema / properties / prompt / description
      Previous value: -"Natural-language search request to convert into a SearchQuery and execute."New value: +"Natural-language search request to convert into SQL and run."
    • addedInput schema / properties / skip
      Added value: +{
      +  "description": "Number of results to skip for pagination (default 0).",
      +  "type": "number"
      +}
    • addedOutput schema / properties / name
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / searchQuery
      Removed value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}
    • addedOutput schema / properties / sql
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "data",
      -  "total",
      -  "searchQuery",
      -  "warnings"
      -]New value: +[
      +  "data",
      +  "total",
      +  "sql",
      +  "warnings"
      +]
  2. First observedv3.0.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered; the description reinforces 'one read-only SQL statement' consistently. It adds genuine context beyond the annotations: result shape differs for record selections versus aggregates, and the response includes the generated statement, a short title and warnings. It does not discuss failure behavior when a prompt cannot be converted to SQL.

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?

Front-loads the core action and return payload, then result-shape semantics, then usage examples, then the sibling routing rule. Every sentence carries information an agent needs; nothing is repeated from the schema or annotations.

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 three-parameter tool with full schema coverage, annotations and an output schema, the description covers what an agent must know: the conversion-and-execute pipeline, the read-only guarantee, result shape differences, and the alternative tool. Return-value detail beyond that is carried by the output schema.

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 description coverage is 100%, so prompt, skip and limit are already documented in the schema, and the description adds no syntax or format guidance beyond what is there. Baseline 3 applies; the examples of natural-language prompts offer only marginal added meaning for the prompt parameter.

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 pipeline: convert a natural-language question into one read-only SQL statement, run it, and return results plus the statement, a title and warnings. It also disambiguates from the closest sibling by naming vectorSearch and its condition. An agent can distinguish this from semanticSearch/textSearch/findRecords without opening schemas.

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 concrete when-to-use context ('user-facing questions' with two example questions) and explicitly routes direct embedding-similarity work to vectorSearch. It does not address the other plausible alternatives in the sibling list, such as semanticSearch, textSearch, or findRecords, so the exclusions are only partial.

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