Skip to main content
Glama

db_search

Search your database knowledge layer for tables and columns matching a query. BM25 ranking returns relevant results with descriptions and highlighted snippets.

Instructions

Search the knowledge layer for tables/columns matching a query — BM25-ranked.

Use this BEFORE db_list_tables when you're looking for a specific concept
(e.g. "payments", "user email", "shipping address"). db_list_tables returns
every table; db_search returns just the relevant ones with descriptions and
highlighted snippets.

Searches across:
  - Table names, descriptions, and aliases
  - Column names, descriptions, and enum_values
Falls back gracefully to empty results if the query has invalid FTS5 syntax.

Args:
    query:      Search text. Supports FTS5 syntax: phrases ("foo bar"),
                prefix matching (pay*), boolean operators (foo AND bar).
    connection: Connection name. Defaults to first defined.
    target:     "tables", "columns", or "all" (default).
    limit:      Max results to return (default 10).

Returns:
    {query, connection, target, result_count, results: [
        {target_type, table_fqn, column_name, description, snippet, score}, ...
    ]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
connectionNo
targetNoall
limitNo
Behavior4/5

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

No annotations, but the description covers search behavior (BM25 ranking), fallback, and output structure. It doesn't explicitly state it's read-only, but the context implies it; still substantive.

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?

Well-structured with clear sections, minimal redundancy, front-loaded usage tip, and efficient use of bullet points. Every sentence adds value.

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

Completeness4/5

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

Given 4 parameters, no output schema, and no annotations, the description is comprehensive, covering input, output, and edge cases (invalid syntax). Could mention performance but not necessary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% coverage, but the description fully explains each parameter: query syntax (FTS5), connection default, target options, and limit default, adding significant 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?

Description clearly states the tool searches for tables/columns using BM25 ranking, distinguishes it from db_list_tables, and lists the fields it searches across, providing a specific verb and resource.

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?

Explicitly advises to use this tool before db_list_tables when looking for specific concepts, contrasts it with db_list_tables' behavior, and mentions fallback for invalid FTS5 syntax.

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/SurajKGoyal/amnesic'

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