Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add AnthonyAlcaraz/agentic-graph-rag-skills --skill mcp-gateway-two-meta-toolsgit clone --depth 1 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/anthonyalcaraz/agentic-graph-rag-skills/mcp-gateway-two-meta-tools)<a href="https://agentmods.dev/skills/anthonyalcaraz/agentic-graph-rag-skills/mcp-gateway-two-meta-tools"><img src="https://agentmods.dev/badge/skills/anthonyalcaraz/agentic-graph-rag-skills/mcp-gateway-two-meta-tools/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/anthonyalcaraz/agentic-graph-rag-skills/mcp-gateway-two-meta-tools"><img src="https://agentmods.dev/badge/skills/anthonyalcaraz/agentic-graph-rag-skills/mcp-gateway-two-meta-tools.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00142 | $0.01639 |
| Opus 5 | $0.00071 | $0.00820 |
| Sonnet 5 | $0.00028 | $0.00328 |
| Haiku 4.5 | $0.00014 | $0.00164 |
Grade A, and why
mcp-gateway-two-meta-tools scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MCP Gateway — Two-Meta-Tool Architecture
Overview
Writer's production enterprise MCP gateway pattern. RAG-MCP retrieves top-K tools and injects descriptions into the prompt. The Gateway pattern keeps descriptions entirely outside the prompt — the agent sees exactly two tools regardless of how many the gateway manages.
Agent ─── search(query) ───▶ [tool_name_1, tool_name_2, ...]
└── execute(name) ───▶ {tool, params, result}
The book cites Writer running this at "hundreds of connectors and thousands of possible tool calls" without prompt bloat. Phil Fersht's research (HFS / Cognizant) found 73% of organizations deploying agentic AI run multi-agent systems averaging 12 agents per system, with governance frameworks failing once the count exceeds five. The gateway is the enforcement point where tool access policies scale with agent proliferation.
When to Use
- Tool registry exceeds ~30 tools and even RAG-MCP top-K injection bloats
- Multi-tenant agents where each customer should see only their tools
- Per-agent access policies (CS agent sees CRM, finance agent sees reports)
- Compliance domains where the prompt must not name unauthorized tools
- Migrating from individual MCP servers to one gateway endpoint
When NOT to Use
- Tool registry has fewer than 30 tools — use
rag-mcp-tool-selectioninstead - One-off scripts with hardcoded tool flow
- As the only security layer — gateway is enforcement, IAM/RBAC is source-of-truth
- For multi-tool workflow planning — see Baidu COLT (Ch6) for tool-graph retrieval
Process
| Step | Input | Action | Output | Verification |
|---|---|---|---|---|
| 1 | Tool registry JSON | Gateway.from_registry_file(path) |
Gateway instance | len(gateway.registry) > 0 |
| 2 | (Optional) Role-based access policy | Gateway(registry=..., access_filter=fn) or example_access_filter_devops |
Gateway scoped to one role | len(gateway._visible()) < len(gateway.registry) for restricted roles |
| 3 | Backend bindings (boto3 / HTTP / MCP forward) | gateway.register_executor("tool_name", fn) per tool |
Wired gateway | Each execute call returns real backend results, not dry-run |
| 4 | User query | gateway.search(query, top_k=5) |
List of {name, score} — descriptions NOT included |
Result is JSON-serializable; no tool descriptions leaked |
| 5 | Selected tool name + parameters | gateway.execute(tool_name, **params) |
{tool, params, result} |
Access filter raises PermissionError for out-of-scope tools |
| 6 | Constant-prompt budget check | gateway.agent_prompt(query) |
Prompt string | len(prompt) does NOT scale with registry size |
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 107 lines · 142 tokens per session scan A 66f2177314a1
mcp-gateway-two-meta-tools is a skill published in the GitHub repository AnthonyAlcaraz/agentic-graph-rag-skills (10 stars, last pushed 2mo ago), licensed MIT. It adds 142 tokens to every session and 1,639 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
cqrs-implementation
Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.
workflow-orchestration-patterns
Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.
microservices-patterns
Design microservices architectures with service boundaries, event-driven communication, and resilience patterns. Use when building distributed systems, decomposing monoliths, or implementing microservices.
deepstream-sop
Use this skill when building, deploying, evaluating, debugging, or measuring latency for the DeepStream SOP Inference Microservice — a GPU-accelerated FastAPI service that detects whether operators perform assembly-line steps in order via event boundary detection (GEBD) plus VLM classification. Trigger even if the…
earth2studio-create-datasource
Create and validate Earth2Studio data source wrappers (DataSource, ForecastSource, DataFrameSource, ForecastFrameSource) from remote stores. Do NOT use for fetching data with existing sources, model inference, or installation tasks.
potpie-infra-architecture
Use for project infra and architecture context: environments, adapters, runtime configuration, deployments, service dependencies, datastores, API contracts, ownership, incidents, and dependency blast radius.