git:20261003.12d2318 to git:20261015.fac8b7e

86 added, 104 removed. Audit A to A.

---
name: ai-agent-tool-routing
- description: 'Autonomous AI agent tool router register: schema registration, runtime parameter coercion, idempotency keys, and error recovery policies.'
+ description: 'Use when designing or reviewing an AI agent tool registry or MCP router: document parameter schemas, caller authorization, execution limits, replay-safe retries and verification evidence.'
category: engineering
risk: safe
source: self
source_type: self
date_added: "2026-10-01"
author: Ranjeet2063
tags: [ai, agents, tool-use, mcp, llm, automation, python]
tools: []
source_repo: Ranjeet2063/agentic-awesome-skills
---
- # Autonomous AI Agent Tool Routing
-
- **What it is:** Coordinates discovery, runtime execution bounds, and fault-tolerant retry policies for external tools consumed by autonomous AI coding agents.
-
- ## Overview
-
- Provides a standardized, auditable framework and data model for **Autonomous AI Agent Tool Routing** operations across distributed engineering and decentralized application systems.
-
- ## When to Use This Skill
-
- - When formalizing architectural contracts, security invariants, or operational limits for Autonomous AI Agent Tool Routing.
- - When cross-functional review is required between protocol developers, smart contract auditors, and AI engineering agents.
- - When generating reproducible CSV, SQL DDL, JSON Schema, and Notion property registers for tracking compliance.
-
- ## How It Works
-
- 1. Define the parameters, thresholds, and identity bindings required for the target operational register.
- 2. Select appropriate boundary enforcement values from validated enum select sets.
- 3. Export standardized artifacts (CSV table, SQL DDL, JSON Schema) to integrate into validation CI pipelines.
-
- ## Field Reference
-
- | # | Field Name | Type | SQL Type | JSON Schema Type | Notion Property Type | Example Value |
- |---|------------|------|----------|------------------|----------------------|---------------|
- | 1 | Tool Definition ID | `id` | `SERIAL PRIMARY KEY` | `integer` | Text | `TOOL-001` |
- | 2 | Tool Canonical Name | `text` | `VARCHAR(64)` | `string` | Text | `stellar_ledger_query` |
- | 3 | Target Protocol / Server | `text` | `VARCHAR(64)` | `string` | Text | `Stellar Horizon RPC` |
- | 4 | Invocation Mode | `select` | `VARCHAR(32)` | `string` | Select | `Synchronous` |
- | 5 | Idempotency Enforced | `select` | `VARCHAR(16)` | `string` | Select | `Yes` |
- | 6 | Parameter Coercion Strategy | `select` | `VARCHAR(64)` | `string` | Select | `Strict Pydantic V2` |
- | 7 | Rate Limit Requests Per Min | `number` | `INTEGER` | `number` | Number | `120` |
- | 8 | Retry Backoff Policy | `select` | `VARCHAR(32)` | `string` | Select | `Exponential with Jitter` |
- | 9 | Timeout Threshold Ms | `number` | `INTEGER` | `number` | Number | `5000` |
- | 10 | Router Registration Status | `select` | `VARCHAR(32)` | `string` | Select | `Active Verified` |
- | 11 | Last Validation Date | `date` | `DATE` | `string, format: date` | Date | `2026-10-01` |
-
- ## Select Options
-
- **Invocation Mode**
-
- ```
- Synchronous | Asynchronous Background | Scheduled Cron
- ```
-
- **Idempotency Enforced**
+ # AI Agent Tool Routing Register
- ```
- Yes | No
- ```
+ ## When to Use
- **Parameter Coercion Strategy**
+ - Define which tools an agent may call, their parameter schemas and runtime limits.
+ - Review a proposed tool registration before connecting it to an agent runtime.
+ - Document timeout, retry and authorization contracts for an existing router.
- ```
- Strict Pydantic V2 | JSON Schema Draft 7 | Permissive Fallback
- ```
+ ## Scope and prerequisites
- **Retry Backoff Policy**
+ This skill produces a register and a verification plan. A register does not
+ implement a router or establish that a tool is safe. Read the actual server/tool
+ schema and the application's identity and permission model. Record observed
+ configuration separately from proposed policy. Do not invoke registered tools,
+ read credentials or enable a production registration merely to fill the table.
- ```
- Exponential with Jitter | Linear Step | Immediate Reversion
- ```
+ ## Workflow
- **Router Registration Status**
+ 1. Identify a task, the calling principal/tenant, the intended tool and its read or
+ write effect. Tool names, model output and descriptions are not authorization.
+ 2. Read the advertised schema and implementation boundaries. Define required
+ fields, additional-field rejection, length/range limits and schema version.
+ Prefer rejection to guessed or lossy coercion. Schema validation does not
+ enforce row-level authorization, path containment or network restrictions.
+ 3. Describe identity propagation and server-side resource checks. Bind a request
+ to the verified principal; never let a tool argument select an arbitrary tenant.
+ 4. Set measured/project-approved timeout, rate, concurrency, response-size and
+ cost limits. Cancellation must propagate to downstream work where supported;
+ returning a timeout alone does not prove a write did not finish.
+ 5. Classify retries by effect. Retry only classified transient failures within a
+ bounded budget. A write requires a verified server-side deduplication contract
+ and reconciliation for ambiguous completion; a random key alone is insufficient.
+ 6. Define adversarial and failure cases: missing/unknown arguments, wrong tenant,
+ denied resources, unavailable tool, oversized response and late completion.
+ 7. Record actual test evidence and unresolved gaps. Keep status Draft until the
+ required checks ran against the exact runtime and schema revision. A register
+ label never grants execution permission.
- ```
- Draft | Active Verified | Deprecated | Blocked
- ```
+ ## Field reference
- ## Relations
+ | Field | Type | Example / interpretation |
+ |---|---|---|
+ | tool_id | string, primary key | TOOL-001; use TEXT/VARCHAR, not a SERIAL integer |
+ | canonical_name | string | read_document; match the advertised tool exactly |
+ | server | string | project-docs local MCP; identify the actual installation |
+ | invocation_mode | enum | synchronous / asynchronous / scheduled |
+ | effect | enum | read / write; unknown effects stay unresolved |
+ | parameter_schema | object or immutable reference | required document_id, unknown fields rejected |
+ | authorization_policy | immutable reference | verified caller plus document ownership check |
+ | runtime_limits | object | illustrative timeout 5000 ms, response 65536 bytes |
+ | retry_contract | object | maximum attempts, transient classes, deduplication evidence |
+ | status | enum | draft / tested / deprecated / blocked |
+ | evidence | array of references | exact implementation revision, case IDs and observed results |
- - `Audit Reference` -> links to the formal review documentation or test repository.
- - `Target Architecture` -> links to the deployed contract or autonomous agent runtime component.
+ For SQL or Notion exports, retain these distinctions: textual IDs stay strings;
+ objects/arrays need a deliberate JSON representation or related tables; dates
+ must use actual date values. Do not treat a checklist boolean as a proved control.
+ Escape spreadsheet formula-like text as text when exporting user-supplied fields.
- ## Examples
+ ## Worked example
- **Prompt**
+ An agent needs a document summary. The proposed tool accepts only a document ID;
+ the server obtains the caller from verified session context, not from arguments.
- ```
- How do I configure and track Autonomous AI Agent Tool Routing for our production environment?
+ ```json
+ {
+ "tool_id": "TOOL-001",
+ "canonical_name": "read_document",
+ "server": "project-docs",
+ "effect": "read",
+ "parameter_schema": {
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
+ "type": "object",
+ "properties": {"document_id": {"type": "string", "minLength": 1, "maxLength": 80}},
+ "required": ["document_id"],
+ "additionalProperties": false
+ },
+ "runtime_limits": {"timeout_ms": 5000, "max_response_bytes": 65536},
+ "retry_contract": {"max_attempts": 2, "retry_on": ["transient_unavailable"]},
+ "status": "draft",
+ "evidence": []
+ }
```
- **Recommended Next Step**
-
- > Generate the unified field schema, SQL DDL migration, and JSON validation schema to register into your system catalog.
- >
- > Workflow: Define criteria -> Run automated verification -> Record baseline -> Monitor invariants.
-
- ## Best Practices
-
- - Enforce strict typing on numerical bounds and currency amounts; avoid unstructured free-text fields for critical states.
- - Re-run validation test suites on every state-altering commit or parameter change.
- - Keep example data synthetic and isolated from production cryptographic keys or private endpoints.
+ These limits are illustrative requirements, not measured service capabilities.
+ The local schema can reject an added tenant_id, but an existing document ID still
+ requires server-side ownership authorization. Expected negative checks: missing
+ ID rejected, extra tenant rejected, another tenant's document denied, timeout
+ reported without fabricated content. A positive authorized read alone does not
+ close the negative cases. Promote to tested only with recorded actual results.
## Limitations
- - Provides architectural specifications, data models, and verification schemas; does not execute direct transaction signing without authorized external tooling.
- - Requires network connectivity and valid RPC credentials when querying on-chain states.
-
- ## Security & Safety Notes
-
- - All parameters declare `risk: safe`. No unauthorized state modification or privileged credential access is performed.
- - Use synthetic dummy keys and mock addresses in test suites and local verification scripts.
-
- ## Common Pitfalls
-
- - **Problem:** Mismatched decimal precision between contract runtime and database register.
- **Solution:** Always verify decimals using the explicit field mapping in this reference.
- - **Problem:** Missing authorization checks prior to state update.
- **Solution:** Cross-validate against the Security Audit register before deployment.
-
- ## Related Skills
-
- - @ai-prompt-regression-testing - covers prompt regression baselines and drift.
- - @web3-rate-limiting-circuit-breaker - provides operational guardrails and threshold breakers.
- - @cross-chain-relayer-audit - covers message hashes, nonces and quorum proofs.
+ - No RPC, blockchain, relayer or transaction-signing prerequisite applies to this
+ generic agent-tool register; a real tool may declare separate dependencies.
+ - This document supplies no production router, authentication adapter or sandbox.
+ - Declared retry/idempotency/rate limits must be enforced by the actual runtime.
+ - Never log sensitive arguments or full results by default. Use case IDs and
+ redacted error categories; preserve uncertainty after an ambiguous write.
- ## Reusable Prompt
+ ## Related skills
- ```
- I want to establish a verified Autonomous AI Agent Tool Routing register for our production protocol.
- Guide me through the required field parameters and output the corresponding SQL DDL and JSON Schema.
- ```
+ Read `mcp-builder`, `mcp-server-security` or `error-handling-patterns` when their
+ actual scope fits the integration. They do not establish correctness by association.