Save 37,000+ tokens by loading Palantir MCP tools on-demand

I analyzed the token usage of all 51 Palantir MCP tools and found they consume ~37,555 tokens when fully loaded into Claude Code’s context window.

The Solution: Deferred Tool Loading

Instead of loading all tools upfront, use ToolSearch to load only what you need:

ToolSearch query: “select:mcp__palantir-mcp__search_foundry_ontology”

Token Savings by task

Task With Deferred Without Savings
Documentation lookup ~150 37,555 99%
Ontology search 2,800 37,555 93%
Build datasets ~1,200 37,555 97%

Top Token-Heavy Tools

Tool Tokens
aggregate_ontology_objects 6,300
create_foundry_rest_api_data_source_webhook 3,900
search_foundry_ontology 2,800
create_or_update_foundry_link_type 2,300

The lightweight documentation tools (142-294 tokens) are great for quick lookups without the overhead.

1 Like

Great learning @Olek and thanks for sharing!