Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk4 min

One TypeScript Tool Contract for MCP and AI Agent SDKs

A shared tool manifest can reduce duplicate definitions across MCP and agent SDKs, provided adapters handle target-specific schema limits and runtime validation.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Define each agent tool once as a portable contract—name, description, input JSON Schema, and, when useful, output JSON Schema—then use explicit adapters to produce MCP and provider-specific definitions. Keep vendor options outside the shared core, and validate both generated schemas and actual tool data at runtime: TypeScript types alone cannot validate network input, and schema conversion may be incomplete.

What belongs in a shared tool manifest?

A manifest should express only the concepts that integrations genuinely share. A practical core has four fields:

As an Amazon Associate I earn from qualifying purchases.

  • name: a stable identifier for the operation.
  • description: a human-readable explanation of what it does and when to use it.
  • inputSchema: a JSON Schema describing accepted arguments.
  • outputSchema: an optional JSON Schema describing the exact structured result.

This matches the tool shape described in OpenAI’s MCP server overview, where an output schema is optional. MCP itself defines protocol types in a versioned schema; the TypeScript schema at version 2026-07-28 is a dated specification artifact, not a timeless contract.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep integration-specific settings in an explicit extension namespace rather than adding them to the portable core. For example, a provider may accept a strict-mode option while a client may need display metadata. Namespacing those additions makes their ownership visible and prevents one integration’s feature from becoming an accidental requirement for every other one.

Choose a source of truth for TypeScript and JSON Schema

TypeScript declarations are useful to application code, but they disappear at runtime. They do not check untrusted arguments arriving over a network or prove that a tool returned the expected object. Choose a runtime-capable schema definition as the source of truth, or define JSON Schema as the canonical artifact and generate or coordinate the TypeScript types from it. Whichever direction you choose, make drift detectable.

A minimal conceptual representation might look like this:

Rank #2
TypeScript Programming Language - Software Engineer & Coder T-Shirt
  • TypeScript implements a superset of syntax for strictly typed development, facilitating deep static analysis and enhanced development environment integration. The compiler translates source into standard script formats, ensuring parity across any runtime.
  • TypeScript is ideal for front-end developers, full-stack engineers, and software architects who build large-scale web applications. It serves those looking to improve code excellence, reduce bugs through static checking, and maintain complex projects more.
  • Lightweight, Classic fit, Double-needle sleeve and bottom hem
type ToolManifest = {
  name: string;
  description: string;
  inputSchema: JsonSchema;
  outputSchema?: JsonSchema;
  extensions?: {
    provider?: Record<string, unknown>;
    client?: Record<string, unknown>;
  };
};

JsonSchema here stands for the JSON Schema type supported by your chosen implementation; it is not a guarantee that every integration accepts every schema keyword. Validate the manifest itself, then validate inputs and structured outputs at the boundaries where data enters or leaves your application.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Adapt the portable contract to each integration

Do not assume that one serialized manifest can be sent unchanged to every target. Write a separate adapter for MCP and for each model SDK or provider interface. Each adapter should map the shared fields to the target’s required shape, handle extensions only where supported, and report unsupported schema constructs rather than silently discarding them.

  1. Validate the canonical manifest. Check required fields and ensure its schemas are valid under the JSON Schema dialect and conventions your system has selected.
  2. Convert with a target-specific adapter. Map the name, description, input schema, optional output schema, and any supported target metadata.
  3. Check the generated definition. Validate it against the target’s accepted schema subset and required fields. Treat conversion failures and unsupported constructs as visible errors or warnings.
  4. Validate live calls and results. Check incoming arguments before execution and structured outputs before returning them to a client.

The OpenAI Agents SDK for TypeScript tools guide documents conversion of supported Standard Schema parameters to JSON Schema and describes strict and non-strict tool-schema options. That is a supported conversion path, not evidence that all schema features translate identically. The OpenAI Agents SDK for Python MCP guide says strict conversion is best-effort and retains the original schema if conversion is unsuccessful. A robust adapter should therefore make the resulting behavior explicit rather than treating conversion as proof of equivalence.

Use an output schema only for structured results

An output schema is useful when a consumer needs to validate a structured return value or reason about it in a subsequent tool call. It should describe the exact object the tool returns, not an idealized or partial version; see the OpenAI plugin reference. If a tool returns only unstructured text, or a target client cannot use output schemas, adding one to the portable manifest may create work without a corresponding validation benefit.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Test compatibility instead of promising parity

There is no basis here for claiming a complete cross-vendor compatibility matrix or identical behavior across integrations. For each target, document and test the questions that affect your contract:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Which JSON Schema dialect and keywords are accepted?
  • Which tool fields are required, and which are optional?
  • Are input schemas supported? Are output schemas supported?
  • What does strict mode enforce, and what happens when conversion cannot satisfy it?
  • Which metadata or extension fields survive adaptation?
  • Does an unsupported construct cause rejection, a warning, or fallback to the original schema?

Keep these answers at the adapter boundary and cover them with tests against the target’s documented contract. This lets the application share stable operation definitions without claiming that integrations interpret every schema or option in the same way.

Keep packaging guidance in its proper scope

OpenAI’s plugin packaging guidance discusses an MCP configuration manifest, recommends its current package format for new packages, and notes compatibility with some legacy formats. That is guidance for OpenAI plugin packaging; it is not a universal MCP protocol requirement and should not be folded into the portable tool contract.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.