Download the PHP package code-wheel/mcp-schema-builder without Composer
On this page you can find all versions of the php package code-wheel/mcp-schema-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download code-wheel/mcp-schema-builder
More information about code-wheel/mcp-schema-builder
Files in code-wheel/mcp-schema-builder
Download code-wheel/mcp-schema-builder
More information about code-wheel/mcp-schema-builder
Files in code-wheel/mcp-schema-builder
Vendor code-wheel
Package mcp-schema-builder
Short Description JSON Schema builder and validator for MCP tool definitions
License MIT
Package mcp-schema-builder
Short Description JSON Schema builder and validator for MCP tool definitions
License MIT
Please rate this library. Is it a good library?
Informations about the package mcp-schema-builder
MCP Schema Builder
A fluent JSON Schema builder with validation for MCP (Model Context Protocol) tool definitions. Build type-safe schemas, validate LLM-generated inputs, and use pre-built patterns for common MCP tools.
Installation
Quick Start
Building Schemas
Validating Input
MCP Presets
Schema Composition
Schema Builder API
String
Integer / Number
Boolean
Array
Object
MCP Presets Reference
Identifiers
| Method | Description |
|---|---|
McpSchema::entityId($type) |
Entity ID (numeric or UUID) |
McpSchema::machineName($desc) |
Machine name pattern [a-z][a-z0-9_]* |
McpSchema::uuid() |
UUID format |
McpSchema::slug() |
URL-safe slug |
Pagination & Filtering
| Method | Description |
|---|---|
McpSchema::pagination($default, $max) |
limit + offset properties |
McpSchema::cursorPagination($default) |
limit + cursor properties |
McpSchema::sorting($fields) |
sort_by + sort_order properties |
McpSchema::searchQuery($minLen) |
Search query string |
McpSchema::statusFilter($statuses) |
Status enum filter |
McpSchema::dateRange() |
from + to date properties |
Content
| Method | Description |
|---|---|
McpSchema::title($maxLen) |
Title string with length limits |
McpSchema::body($allowHtml) |
Body/content field |
McpSchema::tags() |
Array of tag strings |
McpSchema::metadata() |
Key-value object |
Complete Tool Schemas
| Method | Description |
|---|---|
McpSchema::listToolSchema($filters, $sorts) |
List entities with pagination |
McpSchema::getToolSchema($idField, $type) |
Get single entity by ID |
McpSchema::createToolSchema($required, $optional) |
Create entity |
McpSchema::updateToolSchema($idField, $fields) |
Update entity |
McpSchema::deleteToolSchema($idField, $force) |
Delete entity |
McpSchema::confirmation() |
Destructive operation confirmation |
Validation
The SchemaValidator validates:
- Type checking: string, integer, number, boolean, array, object
- String constraints: minLength, maxLength, pattern, format
- Number constraints: minimum, maximum, exclusiveMinimum, exclusiveMaximum
- Array constraints: minItems, maxItems, uniqueItems, items schema
- Object constraints: required properties, additionalProperties
- Enum validation: Value must be in allowed list
- Format validation: email, uri, uuid, date, date-time, ipv4, ipv6
Integration with mcp-error-codes
Integration with mcp-tool-gateway
License
MIT License - see LICENSE file.
All versions of mcp-schema-builder with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.1
The package code-wheel/mcp-schema-builder contains the following files
Loading the files please wait ...