Parameters
object_type(required): Type of object to search -"schema","table","view","column","procedure","function", or"index"pattern(optional): Search pattern using SQL LIKE syntax (%for wildcard,_for single character). Defaults to"%"(match all)schema(optional): Filter results to a specific schematable(optional): Filter to a specific table (requiresschema; only applies whenobject_typeis"column"or"index")detail_level(optional): Level of detail -"names"(default),"summary", or"full"limit(optional): Maximum results to return (default: 100, max: 1000)
Response Format
Results come back in the same envelope as the other tools.data echoes the search that ran and adds count, results, and truncated (true when limit was reached, so there may be more matches):
count and results.
Detail Levels
Examples
Pattern Syntax
Use SQL LIKE pattern syntax for flexible matching:%- Matches any sequence of characters_- Matches exactly one character- Case-insensitive matching
user%→ Matches “users”, “user_profiles”, “user_sessions”%_id→ Matches “user_id”, “order_id”, “product_id”test_→ Matches “test_1”, “test_a” (but not “test_10”)%user%→ Matches “users”, “user_profiles”, “app_users”
Token Efficiency
This tool can reduce token usage by 90-99% compared to listing all objects:Table and Column Comments
When usingdetail_level: "summary" or "full", the tool includes database comments/descriptions if they exist. This helps LLMs understand the purpose of tables and columns, especially in complex or legacy databases.
- Table comments appear as the
commentfield on table results (summary and full levels) - Column descriptions appear as the
descriptionfield on each column (full level only) - Fields are omitted when no comment is set, keeping responses token-efficient
Usage Patterns
The tool supports all three detail levels (
names, summary, full) and works seamlessly with multi-database configurations. Results are limited by the limit parameter (default: 100, max: 1000) to prevent excessive token usage.See Also
- execute_sql - Direct SQL execution tool
- explain_sql - Query execution plan tool (opt-in)
- health_check - Connection pool and buffer cache metrics tool (opt-in)
- Custom Tools - Reusable, parameterized SQL operations