Show HN: Gutenberg – Any URL to verified CLI and MCP server and agent skills

Share

A Deep Dive into the Verified Tool Factory for AI Agents

An exhaustive, 4 k‑word exploration of the newest innovation that turns every API into a “safe, verified tool” for intelligent agents.


Table of Contents

  1. Introduction
  2. The Landscape of AI Agent Tools
  1. Enter the Verified Tool Factory
  1. From Any API Surface to a Verified Tool
  1. The Go CLI + MCP Server Stack
  1. Agent Skills & the Tool Lifecycle
  1. Caching with SQLite & FTS5
  1. Safety First: Dry‑Run‑by‑Default & Hashing
  1. Use Cases & Real‑World Examples
  1. Benefits & Competitive Edge
  2. Limitations & Open Questions
  3. Future Directions & Roadmap
  4. Conclusion
  5. Appendix: Key Terminology
  6. References & Further Reading

1. Introduction

In an era where large language models (LLMs) are being integrated into increasingly complex workflows—ranging from content creation to autonomous decision‑making—developers have begun treating these models as agents. Agents are self‑directed entities that plan, reason, and interact with their environment via tools. The tools, in turn, are the building blocks that provide agents with the necessary access to external data, compute resources, and domain‑specific capabilities.

Yet, the proliferation of “tool” integrations has introduced a new set of challenges: heterogeneity, lack of standardization, safety risks, and performance bottlenecks. While some teams have built bespoke wrappers for each third‑party API, the effort is repetitive and error‑prone. Others rely on informal, ad‑hoc solutions that lack robust validation, leading to potential security breaches or policy violations.

The Verified Tool Factory (VTF) is a groundbreaking system that aims to solve these problems by providing an end‑to‑end pipeline: starting from any existing API surface, VTF automatically generates a verified, safe, and runtime‑compatible tool that any agent can use. The system is built on a combination of a Go command‑line interface (CLI), a Multi‑Component Platform (MCP) server, agent skill definitions, and a lightweight SQLite/FTS5 cache for efficient lookups. Crucially, the factory enforces a dry‑run‑by‑default policy and uses cryptographic hashing to ensure integrity.

This article offers a detailed, 4 k‑word summary of the Verified Tool Factory, covering its motivations, technical architecture, safety mechanisms, practical use cases, and future directions.


2. The Landscape of AI Agent Tools

2.1 Why “Tools” Matter for Agents

Agents rely on tools to accomplish real‑world tasks. An LLM by itself cannot access external data, execute code, or interact with the network. Tools act as the agent’s interface to the world. The agent’s prompt engineering includes tool calls—structured instructions that the LLM generates to request an action. A typical tool call might look like:

{"name": "get_stock_price", "arguments": {"symbol": "AAPL"}}

When the agent processes this tool call, the system resolves it to an actual API invocation and returns the result to the LLM. The quality, safety, and reliability of this process determine whether the agent can perform its mission effectively.

2.2 Existing Tool Ecosystems

Several ecosystems have emerged to provide agent tooling:

  • OpenAI's tool interface: OpenAI has introduced a standardized JSON schema for tool definitions that LLMs can call.
  • LangChain: A Python framework that abstracts many third‑party APIs into chainable components.
  • PromptLayer & Weaviate: Databases that store prompts, embeddings, and schema for quick retrieval.
  • OpenAPI & Swagger: Standard ways to describe RESTful APIs, but typically require manual translation to LLM tool definitions.

Despite these options, most solutions involve manual mapping between the API's own schema and the agent's tool schema. Furthermore, they rarely enforce safety or verification at the time of execution.

2.3 Pain Points & Security Concerns

  1. Manual Wrappers: Writing a wrapper for each new API is tedious.
  2. Schema Drift: APIs evolve; wrappers quickly become outdated.
  3. Missing Validation: Argument mismatches or missing fields can cause silent failures.
  4. Security Risks: Unchecked calls can expose sensitive data or trigger unintended side effects.
  5. Performance: Re‑parsing large APIs or repeatedly invoking network calls incurs latency.

These pain points highlight the need for a system that can automatically produce verified tool definitions from any API surface while preserving performance and safety.


3. Enter the Verified Tool Factory

3.1 Core Mission & Vision

The Verified Tool Factory’s mission is to democratize safe, verified tool creation for AI agents. By automating the generation of tool wrappers from arbitrary APIs and ensuring rigorous validation at runtime, the VTF enables developers to:

  • Accelerate agent development cycles.
  • Reduce the risk of accidental misuse or data leaks.
  • Provide robust, repeatable tool definitions that survive API evolution.

3.2 High‑Level Architecture

The VTF comprises the following layers:

  1. API Surface – Any public or private API (REST, GraphQL, gRPC, SDK).
  2. CLI Wrapper Generator – A Go‑based command line tool that consumes API descriptions (OpenAPI, introspection) and outputs a verified tool definition.
  3. MCP Server – A lightweight server that hosts the tool, exposes its interface, and mediates calls.
  4. Agent Skill Registry – A service that catalogs all available tools, exposing metadata for agent discovery.
  5. SQLite/FTS5 Cache – Local caching of tool metadata, argument schemas, and recent invocation results for fast lookup and prompt generation.
  6. Dry‑Run Policy Engine – Enforces that every tool invocation must be validated before actual execution.
  7. Hashing & Integrity Layer – Uses cryptographic hashes to detect tampering of tool definitions.

The following diagram illustrates the flow from API surface to agent runtime:

[API] --> [CLI Wrapper Generator] --> [MCP Server] --> [Agent Skill Registry] --> [Agent Runtime]

4. From Any API Surface to a Verified Tool

4.1 Understanding API Surfaces

An API surface refers to the publicly exposed endpoints, methods, or operations that a service offers. In practice, API surfaces can take many forms:

  • RESTful APIs defined by OpenAPI/Swagger YAML/JSON.
  • GraphQL schemas that specify types and resolvers.
  • gRPC services defined via Protocol Buffers.
  • SDKs in various languages (Java, Python, Go).

The VTF is designed to ingest any of these surfaces. It first normalizes the surface into a canonical representation (a set of operation descriptors with argument types and return types).

4.2 Automatic Wrapper Generation

The Go CLI reads the API description and performs the following steps:

  1. Parse the API surface into operation nodes.
  2. Infer a tool schema using the tool definition format (e.g., OpenAI’s tool schema).
  3. Generate Go code that implements the tool, including argument parsing, validation, and network request handling.
  4. Bundle the generated code with the necessary runtime (e.g., HTTP client, gRPC stub).

Because the CLI is written in Go—a compiled, statically typed language—the resulting wrappers are fast, type‑safe, and free from runtime type errors that are common in dynamic languages.

4.3 Schema Inference & Validation

The tool schema is critical for agent‑tool interaction. It specifies:

  • Name of the tool.
  • Description (human‑readable).
  • Parameters (JSON schema).
  • Return Type (JSON schema).

The CLI automatically maps API request parameters (e.g., query parameters, path variables, JSON body fields) to JSON schema fields. It also supports optional pre‑validation rules, such as:

  • Range checks (e.g., price must be > 0).
  • Regex validation (e.g., email format).
  • Conditional fields (e.g., if country == "US" then zipCode must be 5 digits).

These validations are baked into the wrapper and enforced at runtime.


5. The Go CLI + MCP Server Stack

5.1 Why Go?

Go offers a compelling blend of performance, concurrency, and ease of deployment:

  • Compiled binaries: No runtime dependencies; a single static binary can run anywhere.
  • Static typing: Early detection of API mismatches.
  • Goroutines: Lightweight concurrency for handling multiple tool calls in parallel.
  • Rich standard library: Built‑in HTTP, JSON, and gRPC support.

Thus, Go serves as an ideal foundation for the VTF’s CLI and server components.

5.2 The MCP (Multi‑Component Platform) Server

The MCP server is a lightweight HTTP service that:

  • Exposes a RESTful interface for tool invocation.
  • Manages a tool registry that maps tool names to handler functions.
  • Enforces rate limits, authentication, and logging.

Because the MCP is decoupled from the agent runtime, multiple agents can simultaneously interact with a shared tool pool without contention.

5.3 CLI Interface for Tool Creation

The CLI provides a single command (vtf generate) that accepts an API description file:

$ vtf generate --openapi spec.yaml --output tools/

The CLI then emits:

  • A Go package (tools/<tool_name>) with the generated wrapper.
  • A tool definition JSON that can be consumed by agents.
  • A manifest file for the MCP to register the tool.

The CLI also supports a watch mode that re‑generates the tool on changes to the API spec, enabling continuous integration pipelines.


6. Agent Skills & the Tool Lifecycle

6.1 Skill Definition & Manifest

A skill is an abstraction that groups one or more tools into a coherent domain. For example, a “Finance” skill might expose tools like get_stock_price, get_portfolio_value, and place_order.

The manifest contains:

  • Skill Name
  • Version
  • List of Tool Definitions
  • Dependencies (e.g., authentication keys, environment variables)

Agents query the skill registry to discover relevant tools.

6.2 Tool Discovery & Registration

When the MCP starts, it scans the tools/ directory for manifest files. It then registers each tool with the skill registry, which is a lightweight HTTP service that exposes an endpoint /skills. Agents query this endpoint to list all available tools and their schemas.

Agents can also filter tools by domain tags or required capabilities, facilitating modularity.

6.3 Runtime Binding & Invocation

The agent runtime follows a tool‑first architecture:

  1. Planner: The LLM decides on a sequence of actions (including tool calls).
  2. Executor: When a tool call is generated, the agent serializes the arguments to JSON and sends an HTTP POST to the MCP (/tools/<name>).
  3. Dry‑Run Validation: The MCP first validates arguments against the tool’s JSON schema.
  4. Execution: If validation passes, the MCP executes the tool's handler function.
  5. Response: The tool returns a JSON payload that is fed back into the LLM.

Because the MCP is stateless, the agent can scale horizontally by spinning up additional agent instances.


7. Caching with SQLite & FTS5

7.1 Why Cache?

  • Latency Reduction: Avoid repeated network calls to the MCP for argument validation or tool discovery.
  • Local Prompt Generation: Store recent tool call results to embed in prompts for improved context.
  • Offline Fallback: Provide cached results if the MCP is temporarily unreachable.

7.2 SQLite as a Lightweight KV Store

SQLite is chosen for its zero‑configuration nature and support for transactions:

  • Key‑Value Store: Maps tool names to JSON schemas and invocation metadata.
  • Atomic Transactions: Ensure consistency when updating schemas or cache entries.
  • Compact Size: The entire tool registry can fit under 1 MB.

Agents load the SQLite database at startup, enabling quick schema lookups.

7.3 Full‑Text Search (FTS5) for Prompt Engineering

FTS5 allows the agent to perform full‑text search over cached tool results. For instance, if the agent wants to retrieve the last time a certain stock price was queried, it can issue an FTS5 query:

SELECT result FROM cache WHERE tool = 'get_stock_price' AND content MATCH 'AAPL';

This search can be embedded in the prompt to provide the LLM with recent context without re‑invoking the API.


8. Safety First: Dry‑Run‑by‑Default & Hashing

8.1 Dry‑Run Mechanics

The dry‑run‑by‑default policy is a core safety feature:

  • Dry‑Run Mode: When an agent sends a tool call, the MCP first runs a dry‑run that validates arguments, checks authentication, and simulates the API call without side effects.
  • Result Summary: The dry‑run returns a simulation report (e.g., “All validations passed, would call endpoint X with payload Y”).
  • User Confirmation: Agents can optionally require explicit confirmation before executing.

Dry‑runs prevent accidental state changes (e.g., deleting data or making costly transactions) and allow developers to debug tool calls without paying for API usage.

8.2 Policy Enforcement

The policy engine governs:

  • Rate Limits: Enforces per‑API rate limits based on OpenAPI x-rate-limit extensions.
  • Quota Checks: Uses billing APIs (e.g., OpenAI's costs endpoint) to prevent exceeding budgets.
  • Access Controls: Supports per‑tool access tokens; only authorized agents can invoke sensitive tools.

Policies are expressed in a declarative language (YAML) and can be overridden at runtime if needed.

8.3 Integrity via Hashing

To guarantee that a tool’s definition has not been tampered with:

  • Cryptographic Hashes: Each tool definition JSON is hashed (SHA‑256).
  • Signature Verification: The MCP verifies the hash against a signed manifest.
  • Audit Trail: All invocations are logged with hash digests for post‑mortem analysis.

If a discrepancy is detected, the tool is automatically quarantined and the agent receives an error.


9. Use Cases & Real‑World Examples

9.1 Web Scraping Agent

Scenario: A news aggregator agent needs to retrieve the latest headlines from various news sites, parse the HTML, and summarize them.

Solution:

  • The VTF consumes the news sites’ public APIs (RSS feeds, JSON endpoints).
  • Generates a scrape_headlines tool with parameters site_id and max_articles.
  • The agent calls scrape_headlines, receives a list of headlines, then calls a summarize tool.
  • Dry‑run ensures that scraping respects robots.txt and doesn't exceed per‑site limits.

9.2 Financial Data Analyst

Scenario: An investment firm wants an AI agent to monitor portfolio performance, fetch real‑time market data, and place orders.

Solution:

  • VTF ingests the broker’s REST API spec (e.g., Alpaca, Interactive Brokers).
  • Generates tools: get_market_data, place_order, get_portfolio_value.
  • Agent policy ensures that order placement requires an additional confirmation token.
  • SQLite caching stores recent market data to reduce API calls during high‑frequency analysis.

9.3 Healthcare Diagnostic Assistant

Scenario: A telemedicine platform uses an AI agent to triage patients, retrieve lab results, and schedule appointments.

Solution:

  • VTF consumes the hospital’s EHR API spec (FHIR).
  • Generates tools: get_lab_results, schedule_appointment, recommend_treatment.
  • Dry‑run verifies that data is anonymized, preventing accidental disclosure.
  • Policies enforce HIPAA compliance, limiting data exposure to authorized users.

10. Benefits & Competitive Edge

| Benefit | Description | |---------|-------------| | Rapid Tool Creation | One CLI command generates verified wrappers from any API. | | Standardized Schema | Tools expose JSON schemas that agents can validate against. | | Zero‑Configuration Deployment | Go binaries run anywhere; no runtime required. | | Safety by Default | Dry‑runs and policy enforcement prevent accidental misuse. | | Integrity Assurance | Hashing & signatures guarantee that tool definitions remain untampered. | | Scalable Agent Runtime | MCP server handles concurrent invocations, enabling horizontal scaling. | | Low‑Latency Caching | SQLite/FTS5 keeps recent results local, cutting network round‑trips. | | Policy Flexibility | Declarative YAML policies easily adapt to changing compliance needs. | | Observability | Logs, audit trails, and hash digests aid debugging and compliance audits. |


11. Limitations & Open Questions

While the VTF is a powerful tool, several challenges remain:

  • GraphQL Mutations: The current CLI focuses on REST/HTTP. GraphQL mutations need more sophisticated type inference.
  • Streaming Responses: For APIs that stream data (e.g., WebSockets), the wrapper must handle partial responses.
  • Stateful Agents: The system currently treats each tool call as stateless; adding session context may require enhancements.
  • Multi‑Language Support: Generating wrappers in languages other than Go (Python, JavaScript) would broaden adoption.
  • Dynamic API Discovery: Some APIs expose endpoints at runtime; automatic discovery is non‑trivial.

Addressing these issues will be part of future roadmap iterations.


12. Future Directions & Roadmap

  1. GraphQL & gRPC Support – Extend the CLI to parse introspection schemas and generate appropriate wrappers.
  2. Streaming & WebSocket Integration – Enable real‑time data feeds with backpressure handling.
  3. Multi‑Language Codegen – Add support for Python, TypeScript, and Java wrappers, leveraging template engines.
  4. Policy Marketplace – Publish a collection of pre‑written policy modules (e.g., GDPR, HIPAA) that can be dropped into projects.
  5. Serverless Deployment – Wrap the MCP in a serverless function (AWS Lambda, Cloudflare Workers) for ultra‑low‑cost deployment.
  6. Dynamic Tool Federation – Allow tools to be discovered and invoked across distributed microservices.
  7. Graph‑Based Dependency Graphs – Visualize tool call chains for debugging and optimization.

13. Conclusion

The Verified Tool Factory marks a decisive step toward a standardized, safe, and automated tooling ecosystem for AI agents. By bridging the gap between arbitrary API surfaces and verified agent tools, it empowers developers to focus on higher‑level agent design rather than plumbing. Its combination of Go‑based CLI generation, a lightweight MCP server, robust policy enforcement, and efficient caching creates a resilient architecture that can scale from single‑agent prototypes to enterprise‑grade deployments.

While challenges such as GraphQL support and streaming data remain, the VTF already delivers tangible benefits: rapid tooling, reduced risk, and measurable performance gains. As the AI agent landscape evolves, the Verified Tool Factory will likely become a cornerstone component in the next generation of intelligent, trustworthy software systems.


14. Appendix: Key Terminology

| Term | Definition | |------|------------| | Agent | A self‑directed entity that plans and executes actions using a language model and tools. | | Tool | A callable component that exposes a JSON‑schema‑driven interface, enabling agents to perform external operations. | | Skill | A collection of related tools, often grouped by domain (e.g., Finance, Healthcare). | | MCP | Multi‑Component Platform, a lightweight server that hosts tools and mediates calls. | | Dry‑Run | A validation pass that checks arguments and simulates the tool call without side effects. | | FTS5 | SQLite’s full‑text search extension, enabling efficient text search over cached data. | | OpenAPI | A specification for describing RESTful APIs in JSON or YAML. | | GraphQL | A query language for APIs that allows clients to request exactly the data they need. | | Hashing | The use of cryptographic hash functions (e.g., SHA‑256) to ensure integrity. |


15. References & Further Reading

  1. OpenAI Tool API – Official documentation on defining and calling tools.
  2. LangChain – Python framework for building AI agents with modular tools.
  3. OpenAPI Specification – Official spec for describing RESTful APIs.
  4. SQLite FTS5 – Documentation on full‑text search in SQLite.
  5. Go Documentation – Official Go language docs, especially the net/http and encoding/json packages.
  6. GraphQL Introspection – Reference on querying schema information from GraphQL endpoints.
  7. HIPAA Compliance Guide – Standards for protecting healthcare data.

Prepared by the AI Systems Insights Team – 2026-05-25

Read more