Automated summary
This skill guides the design of JSON Schemas for WebMCP tool inputs and outputs so agents can consume them reliably.
Strengths
- Explains the dual role of the schema: agent guidance and browser-side input validation
- Provides a type-to-use-case table plus ready-made commerce patterns (product search, add to cart, shipping address)
- Stresses `description` annotations, constraints (enum, pattern, minimum/maximum) and a minimal set of required parameters
- Gives concrete output conventions: status field, structured data, pagination info, and error objects
Limitations
- The file cuts off mid-way through the "Minimal surface" principle, so the design rules are incomplete
- WebMCP does not formally define an output schema, so the output conventions are recommendations rather than a standard
- It mandates fetching live docs and web searches before writing code, adding steps and requiring network access
Reach for it when you need to write or tighten an `inputSchema` for a WebMCP tool that an agent will call.
Avoid it for schema work outside WebMCP (plain OpenAPI, proprietary model function calling) without first checking how the specifications differ.
Security analysis
SafeThis is a documentation/guidance skill about designing JSON Schemas for WebMCP tools. It contains no executable payloads, no destructive commands, no network calls that pipe into shell, and no credential handling. The declared tools (Bash, WebFetch, WebSearch) are justified for fetching specs and running local work, and all examples are benign schema definitions. It even explicitly advises against collecting sensitive data such as passwords or full card numbers.
No concerns found
How this analysis is madeExamples
Design a WebMCP inputSchema for a tool that searches a product catalog, with a required search query and optional category, max price, and sort order filters.Here is my add-to-cart inputSchema — review it and add missing descriptions, constraints, and defaults so an agent can fill it in correctly.Add enum and pattern constraints to my shipping address inputSchema so zip codes and countries are validated before the tool executes.name: webmcp-tool-schemas description: Design JSON Schemas for WebMCP tool inputs and outputs — proper types, constraints, nested objects, and agent-friendly documentation. Use when defining or refining tool schemas for agent consumption. allowed-tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch
WebMCP Tool Schema Design
Before writing code
Fetch live docs:
- Fetch
https://webmachinelearning.github.io/webmcp/for theinputSchemaspecification and any constraints - Web-search
webmcp inputSchema JSON Schema requirementsfor schema format details - Web-search
JSON Schema draft specificationfor the JSON Schema version used by WebMCP - Web-search
webmcp tool schema best practicesfor community guidance
Conceptual Architecture
Role of Schemas in WebMCP
The inputSchema in a tool definition serves two purposes:
- Agent guidance — The agent reads the schema to understand what parameters to provide
- Input validation — The browser validates agent-provided input against the schema before calling
execute
Schema Structure
WebMCP uses standard JSON Schema. Each tool's inputSchema is a JSON Schema object:
inputSchema: {
type: "object",
properties: {
paramName: { type: "string", description: "What this parameter is" },
// ...more properties
},
required: ["paramName"]
}
Property Types
| JSON Schema Type | Use For | Example |
|-----------------|---------|---------|
| string | Text, IDs, codes | Product ID, search query, coupon code |
| number | Decimal values | Price, weight, rating |
| integer | Whole numbers | Quantity, page number |
| boolean | True/false flags | In-stock filter, gift wrap option |
| array | Lists | Product IDs, selected categories |
| object | Nested structures | Address, payment details |
Description Annotations
Always add description to properties — agents use these to decide what values to provide:
properties: {
query: {
type: "string",
description: "Search keywords for product catalog"
},
maxPrice: {
type: "number",
description: "Maximum price in USD. Omit to search all prices."
}
}
Constraints
Use JSON Schema constraints to guide agent input:
minLength/maxLengthfor stringsminimum/maximumfor numbersenumfor fixed value setspatternfor regex validationminItems/maxItemsfor arraysdefaultfor optional parameters with defaults
Commerce Schema Patterns
Product search:
{
type: "object",
properties: {
query: { type: "string", description: "Search keywords" },
category: { type: "string", enum: ["electronics", "clothing", "home"] },
maxPrice: { type: "number", minimum: 0 },
sortBy: { type: "string", enum: ["relevance", "price_asc", "price_desc", "rating"] }
},
required: ["query"]
}
Add to cart:
{
type: "object",
properties: {
productId: { type: "string", description: "Product identifier" },
quantity: { type: "integer", minimum: 1, maximum: 99, default: 1 },
variant: { type: "string", description: "Size, color, or variant ID" }
},
required: ["productId"]
}
Shipping address:
{
type: "object",
properties: {
street: { type: "string" },
city: { type: "string" },
state: { type: "string" },
zipCode: { type: "string", pattern: "^[0-9]{5}(-[0-9]{4})?$" },
country: { type: "string", enum: ["US", "CA", "UK"] }
},
required: ["street", "city", "state", "zipCode", "country"]
}
Output Conventions
While WebMCP doesn't formally specify an output schema, tools should return predictable JSON:
- Always include a
statusorsuccessfield - Return structured data, not HTML or plain text
- Include pagination info for list results (
total,page,pageSize) - Return error objects with
codeandmessagefor failures
Schema Design Principles
- Minimal surface — Only require parameters the tool actually needs
- Descriptive — Every property should have a
description - Constrained — Use
enum,minimum,maximumto prevent invalid inputs - Flat when possible — Avoid deep nesting; agents handle flat schemas better
- Consistent — Use the same naming conventions across all tools (camelCase)
- No sensitive data — Never ask for passwords, SSNs, or full card numbers in schemas
Fetch the WebMCP spec for the exact JSON Schema version supported and any WebMCP-specific constraints before designing schemas.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/webmcp-tool-schema-design-mryiqgkg/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/webmcp-tool-schema-design-mryiqgkg' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/webmcp-tool-schema-design-mryiqgkg/download' --output '.skill-downloads/webmcp-tool-schema-design-mryiqgkg/SKILL.md.part' && mv '.skill-downloads/webmcp-tool-schema-design-mryiqgkg/SKILL.md.part' '.skill-downloads/webmcp-tool-schema-design-mryiqgkg/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
Tools declared by the author (check availability in your agent): Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/webmcp-tool-schema-design-mryiqgkg/SKILL.md' && test -s '.skill-downloads/webmcp-tool-schema-design-mryiqgkg/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/webmcp-tool-schemas' && cp -R '.skill-downloads/webmcp-tool-schema-design-mryiqgkg' '.claude/skills/webmcp-tool-schemas'Cursor
test -f '.skill-downloads/webmcp-tool-schema-design-mryiqgkg/SKILL.md' && test -s '.skill-downloads/webmcp-tool-schema-design-mryiqgkg/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/webmcp-tool-schemas' && cp -R '.skill-downloads/webmcp-tool-schema-design-mryiqgkg' '.cursor/skills/webmcp-tool-schemas'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/webmcp-tool-schema-design-mryiqgkg'openskills read 'webmcp-tool-schema-design-mryiqgkg'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/webmcp-tool-schema-design-mryiqgkg/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.