Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How to expose tools to AI agents without clogging their context

Description and use

Implementing tool discovery with pinned tools reduced token consumption by 69 %, improving AI agent efficiency.

Problem

AI agents struggle to manage large tool catalogs because tool definitions, selection, and results consume excessive context tokens, hindering performance and clarity.

Outcome

Implementing discovery with pinned tools cut input token usage by 69% compared to loading all tool definitions, improving efficiency and reducing context clutter.

Workflow

  • Configure Agent Sessions to expose a small working set of tools and enable discovery for the rest.
  • Pin frequently used tools (e.g., meeting and account actions) in the session configuration.
  • When a task starts, load only the pinned tools into the model’s context.
  • If the agent needs an additional tool, invoke the meta tool nango_tool_search to find matching definitions.
  • Execute the selected tool via nango_execute or directly if already loaded.
  • Enforce execution permissions at the backend, ensuring the agent cannot broaden its scope.
  • Measure token usage for the entire task to decide which tools to pin.
  • Iterate on pinning strategy based on observed usage patterns.

Evidence

Discovery with two pinned tools used 69% fewer input tokens per task than loading all 57 tool definitions upfront in our synthetic test.

Source

Tool exposure creates three separate costs: Definitions, Selection, Results.

Source

Separate tool permissions from tool visibility. User authorization, session permissions, and tool visibility control different things.

Source

  • Record date: 2026-10-15T19:56:31.003Z