Skip to content

Tool Filtering

Temp edited this page Jan 29, 2026 · 1 revision

Tool Filtering

AI IDEs like Cursor have tool limits. With 204 tools available, you must use tool filtering to stay within your IDE's limits.


How It Works

The --tool-filter argument accepts shortcuts, groups, or tool names. Mix and match freely.

# Use a preset
--tool-filter starter

# Combine groups
--tool-filter core,jsonb,transactions

# Extend a preset
--tool-filter starter,+text

# Remove specific tools
--tool-filter starter,-pg_drop_table

Shortcuts (Predefined Bundles)

All shortcuts include Code Mode (pg_execute_code) by default.

Shortcut Tools Use Case Includes
starter 58 🌟 Recommended Core, transactions, JSONB, schema
essential 46 Minimal footprint Core, transactions, JSONB
dev-power 53 Power Developer Core, transactions, schema, stats, partitioning
ai-data 59 AI Data Analyst Core, JSONB, text, transactions
ai-vector 48 AI/ML with pgvector Core, vector, transactions, partitioning
dba-monitor 58 DBA Monitoring Core, monitoring, performance, transactions
dba-manage 57 DBA Management Core, admin, backup, partitioning, schema
dba-stats 56 DBA Stats/Security Core, admin, monitoring, transactions, stats
geo 42 Geospatial Workloads Core, PostGIS, transactions
base-core 58 Base Building Block Core, JSONB, transactions, schema
base-ops 51 Operations Block Admin, monitoring, backup, partitioning, stats, citext
ext-ai 25 Extension: AI/Security pgvector, pgcrypto
ext-geo 24 Extension: Spatial PostGIS, ltree
ext-schedule 19 Extension: Scheduling pg_cron, pg_partman
ext-perf 28 Extension: Perf/Analysis pg_stat_kcache, performance

Tool Groups (20 Available)

All groups include Code Mode by default.

Group Tools Description
core 21 Read/write queries, tables, indexes, convenience/drop tools
transactions 8 BEGIN, COMMIT, ROLLBACK, savepoints
jsonb 20 JSONB manipulation and queries
text 14 Full-text search, fuzzy matching
performance 21 EXPLAIN, query analysis, optimization
admin 11 VACUUM, ANALYZE, REINDEX
monitoring 12 Database sizes, connections, status
backup 10 pg_dump, COPY, restore
schema 13 Schemas, views, sequences, functions, triggers
partitioning 7 Native partition management
stats 9 Statistical analysis
vector 16 pgvector (AI/ML similarity search)
postgis 16 PostGIS (geospatial)
cron 9 pg_cron (job scheduling)
partman 11 pg_partman (auto-partitioning)
kcache 8 pg_stat_kcache (OS-level stats)
citext 7 citext (case-insensitive text)
ltree 9 ltree (hierarchical data)
pgcrypto 10 pgcrypto (encryption, UUIDs)
codemode 1 Code Mode (sandboxed code execution)

Syntax Reference

Prefix Target Example Effect
(none) Shortcut starter Whitelist Mode: Enable ONLY this shortcut
(none) Group core Whitelist Mode: Enable ONLY this group
+ Group +vector Add tools from this group to current set
- Group -admin Remove tools in this group from current set
+ Tool +pg_explain Add one specific tool
- Tool -pg_drop_table Remove one specific tool

Common Configurations

General Purpose (58 tools)

{
  "args": ["--tool-filter", "starter"]
}

AI/ML with Vector Search (48 tools)

{
  "args": ["--tool-filter", "ai-vector"]
}

Geospatial Workloads (42 tools)

{
  "args": ["--tool-filter", "geo"]
}

Starter + Full-Text Search (69 tools)

{
  "args": ["--tool-filter", "starter,+text"]
}

Non-Admin Users (No Code Mode)

If you don't have admin access or prefer individual tool calls:

{
  "args": ["--tool-filter", "starter,-codemode"]
}

Extension-Only (pg_cron + pgcrypto)

{
  "args": ["--tool-filter", "cron,pgcrypto"]
}

Excluding Code Mode

Code Mode requires the admin OAuth scope. To exclude it from any configuration:

--tool-filter starter,-codemode
--tool-filter cron,pgcrypto,-codemode

Legacy Syntax

If you start with a negative filter (e.g., -base,-extensions), the system assumes you want all tools enabled first, then subtracts. This is still supported but not recommended.


Related

Clone this wiki locally