SitePoint15 min readtutorialintermediate
AI Agent Tool Manifests: Building a Unified TypeScript JSON Schema
Summary
A vendor‑agnostic JSON Schema manifest for AI agent tools, with a TypeScript adapter layer that compiles the manifest into OpenAI function‑calling and Anthropic Claude formats, plus runtime validation, permission scoping, and execution constraints.
- Define a single `agent-skill-manifest.json` per tool; the manifest contains `toolId`, `version`, `name`, `description`, `inputSchema`, optional `outputSchema`, `permissions`, and `executionBoundary`.
- The manifest uses JSON Schema draft 2020‑12 directly for `inputSchema`/`outputSchema`, enabling reuse of existing validators (e.g., AJV).
- Adapters translate the manifest to provider‑specific shapes: OpenAI’s `type: "function"` wrapper and Anthropic’s flat `input_schema` format.
- Permissions (`filesystem`, `network`, `exec`, `env`, `none`) and execution boundaries (`timeout`, `retryPolicy`, `maxConcurrency`, `sandboxMode`) are enforced by custom runtimes, not the LLM providers.
Without a unified manifest, teams must maintain N × M tool definitions (N tools, M providers), leading to drift and silent failures when required fields are omitted. A single source of truth eliminates duplication, reduces bugs, and makes sandbox policy enforcement explicit.
6/10




