Tools Reference
SmartGate MCP tools — purpose, inputs, and when to use each smart_* tool.
SmartGate exposes seven MCP tools on tools/list. Each tool is also available through the REST API under /api/v1/* with the same semantics.
For connection setup, see MCP Endpoint. This page describes what each tool does and typical usage — not internal routing algorithms.
Summary
| Tool | One-line purpose |
|---|---|
smart_fetch | Fetch a URL and return Markdown |
smart_search | Web search across configured engines |
smart_context_gate | Compress long text before sending to your LLM |
smart_dedup | Remove duplicate or near-duplicate passages |
smart_budget_guard | Check, count, or record budget usage |
smart_memory | Team-scoped memory CRUD |
smart_pipe | Run multi-step pipelines (templates or custom) |
Authoritative parameter schemas are returned on tools/list from your connected MCP server.
smart_fetch
Purpose: Retrieve a public URL and normalize content to Markdown for agent consumption.
Typical inputs: url (required)
When to use: Research steps, reading docs, pulling page content into an agent loop.
Notes:
- You must have the right to access the URL.
- Large pages may be shaped or truncated according to gateway policy.
- Optional audit headers help group fetches into a task in Activity Logs.
smart_search
Purpose: Run a multi-engine web search and return structured results.
Typical inputs: query string, optional result limits (see live schema)
When to use: Discovery before fetch, fact-checking, building citations.
Notes: Search results are summaries — follow up with smart_fetch for full pages when needed.
smart_context_gate
Purpose: Compress prompts or long context before they are sent to your model provider.
Typical inputs: text body; optional compression ratio (team defaults apply)
When to use: Long tool outputs, bloated system prompts, repeated context in agent loops.
Notes:
- Works over REST and MCP.
- Dashboard → Playground can test compression separately (REST path, not MCP).
- Effective compression ratio may come from team gateway settings on paid plans.
smart_dedup
Purpose: Detect and remove semantically duplicate chunks in text.
Typical inputs: text or list of passages (see schema)
When to use: After multiple fetches or searches merged into one context block.
Notes: Helps reduce token waste without manual editing.
smart_budget_guard
Purpose: Check remaining budget, increment counters, or record usage for guardrails.
Typical inputs: action mode (check, count, record, etc. — see schema)
When to use: Before expensive loops, enforcing team spending caps, agent self-throttling.
Notes:
- Bound to your API key's team by default.