Skip to main content
Glama
db-conn-mcp

db-conn-mcp

find_columns

Read-onlyIdempotent

Locate columns by name across all tables in a database using fuzzy, case-insensitive matching, so you can find where a concept lives before querying.

Instructions

Find columns by name across all tables of one database (fuzzy, case-insensitive).

e.g. pattern "email" matches user_email, EMAIL_ADDRESS. Use this to locate where a concept lives before querying. It matches column NAMES only — to find where a data value appears use search_value; to find a table by name use list_tables. limit returns at most that many rows — set it when a broad pattern would otherwise match half the database.

Returns meta and columns, one item per matching column with schema, table, column, type and nullable; meta.truncated is true when limit cut the list.

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": {
      "database": "<database>",
      "pattern": "<pattern>"
    },
    "name": "find_columns"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoReturn at most this many items; `meta.truncated` is then true when more matched. Omit to return every match.
patternYesText to look for in column names, case-insensitively: 'email' matches user_email and EMAIL_ADDRESS.
databaseYesName of a configured database, exactly as list_databases returns it (case-sensitive). Not a DSN, host or server-side database name. An unknown name is an error that lists the configured names.

Output Schema

NameRequiredDescriptionDefault
metaYes
columnsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.8.1
    • addedInput schema / properties / database / description
      Added value: +"Name of a configured database, exactly as list_databases returns it (case-sensitive). Not a DSN, host or server-side database name. An unknown name is an error that lists the configured names."
    • addedInput schema / properties / limit / description
      Added value: +"Return at most this many items; `meta.truncated` is then true when more matched. Omit to return every match."
    • addedInput schema / properties / pattern / description
      Added value: +"Text to look for in column names, case-insensitively: 'email' matches user_email and EMAIL_ADDRESS."
  2. Changed6 schema fields changedv0.8.0
    • addedOutput schema / $defs
      Added value: +{
      +  "Meta": {
      +    "description": "The first key of every tool's answer: what came back, and how long it took.\n\nnull means the field does not apply to the tool, or the tool cannot know it.",
      +    "properties": {
      +      "database": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Database"
      +      },
      +      "elapsed_ms": {
      +        "title": "Elapsed Ms",
      +        "type": "integer"
      +      },
      +      "row_count": {
      +        "anyOf": [
      +          {
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Row Count"
      +      },
      +      "tool": {
      +        "title": "Tool",
      +        "type": "string"
      +      },
      +      "truncated": {
      +        "anyOf": [
      +          {
      +            "type": "boolean"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "title": "Truncated"
      +      }
      +    },
      +    "required": [
      +      "tool",
      +      "database",
      +      "row_count",
      +      "truncated",
      +      "elapsed_ms"
      +    ],
      +    "title": "Meta",
      +    "type": "object"
      +  }
      +}
    • addedOutput schema / properties / columns
      Added value: +{
      +  "items": {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  "title": "Columns",
      +  "type": "array"
      +}
    • addedOutput schema / properties / meta
      Added value: +{
      +  "$ref": "#/$defs/Meta"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "items": {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  "title": "Result",
      -  "type": "array"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "meta",
      +  "columns"
      +]
    • changedOutput schema / title
      Previous value: -"find_columnsOutput"New value: +"FindColumnsResult"
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the description correctly spends its space on matching semantics (fuzzy, case-insensitive) and truncation behavior via meta.truncated — traits the annotations cannot express. The remaining prose restating returned fields duplicates the output schema, slightly diluting the added value.

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?

Front-loaded with the core capability and an example, then sibling routing, then limit advice. The final paragraph enumerating meta and column fields is largely redundant given the output schema and is the one part not earning its place.

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?

With annotations and an output schema already carrying safety and return shape, the description covers what matters: matching rules, scope, alternatives, and truncation. Nothing needed for correct invocation is missing; it is only mildly over-complete on return fields.

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?

Schema coverage is 100%, so baseline is 3, but the description adds intent the schema lacks: limit should be raised when a broad pattern would match half the database, and truncation is flagged in meta. It does not restate the database-name constraint, which the schema already covers well.

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 verb and resource with scope: 'Find columns by name across all tables of one database (fuzzy, case-insensitive).' The example pattern plus the explicit disclaimers ('matches column NAMES only') separate it cleanly from search_value and list_tables without needing their schemas.

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 positive guidance ('Use this to locate where a concept lives before querying') and names both alternatives with the condition that routes away from this tool: search_value for data values, list_tables for table names. It also advises when to set limit, which is the main misuse risk.

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