Skip to content

Shared TypeScript types and protocol schemas for the AI Inspector ecosystem — WebMCP tool types, events, and communication protocols

Notifications You must be signed in to change notification settings

tech-sumit/ai-inspector-types

Repository files navigation

@tech-sumit/ai-inspector-types

Shared TypeScript types and protocol schemas for the AI Inspector ecosystem.

Packages that depend on this

  • @tech-sumit/webmcp-cdp — CDP client library
  • ai-inspector-extension — Chrome DevTools extension
  • @tech-sumit/ai-inspector-server — MCP server + CLI

Installation

pnpm add @tech-sumit/ai-inspector-types

Exports

Tool types

  • WebMCPTool — Tool definition as registered via navigator.modelContext.registerTool()
  • DiscoveredTool — Tool as returned by modelContextTesting.listTools() (inputSchema is DOMString)
  • ToolAnnotations — Metadata hints (readOnlyHint, etc.)

ToolSource interface

  • ToolSource — Abstraction for CDP and extension tool sources
  • ToolSourceConfig — Connection configuration

Events

  • InspectorEvent — Discriminated union of all intercepted events (tool registrations, prompt sessions, streaming, etc.)

Protocol messages

  • ExtToServerMessage / ServerToExtMessage — Extension <-> server WebSocket messages
  • ContentToBackgroundMessage — Content script -> background SW
  • BackgroundToPanelMessage / PanelToBackgroundMessage — Background <-> DevTools panel

JSON Schema

  • JSONSchema / JSONSchemaProperty — JSON Schema types for tool input schemas

Development

pnpm install
pnpm typecheck    # tsc --noEmit
pnpm lint         # eslint
pnpm build        # tsup -> dist/

About

Shared TypeScript types and protocol schemas for the AI Inspector ecosystem — WebMCP tool types, events, and communication protocols

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published