Conversation
- Add params parameter to callTool() method for passing path parameters - Remove manual request manipulation in EntryTypesController and SectionsController - Switch from mapper() to argumentsMapper() for proper callable handling - Add castNumericStringsToIntegers() helper for query param type conversion - Update controllers to use Craft::$container->get() for tool instantiation - Fix EntryTypesControllerTest to use proper array query string notation Controllers now pass path params cleanly via callTool($tool->method(...), ['id' => $value]) instead of manipulating $this->request->setBodyParams() directly.
Replace custom castNumericStringsToIntegers() method with Valinor's built-in allowScalarValueCasting() feature. This provides more comprehensive scalar type conversion (strings to ints/floats/bools) with better type safety and validation. - Add allowScalarValueCasting() to MapperBuilder chain - Remove 13 lines of custom casting logic - Handles HTTP request string values to typed parameters automatically
- Keep human-readable descriptions as inline parameter comments - Move complex type information (union types, array shapes) to @param tags - Improve readability of siteSettings parameter documentation with multi-line format - Fixes PHPStan type recognition for CreateSection and UpdateSection tools
- Remove use statements for PhpMcp\Server\Attributes\McpTool and Schema - Add file system safety rule to AGENTS.md - First step toward converting to PHPStan-only type system
- Remove McpTool and Schema attributes - Move descriptions to method docblocks - Keep parameter descriptions as inline comments - Maintain PHPStan type annotations in @param tags
- GetFieldTypes, GetEntryTypes, UpdateDraft, CreateFieldLayout - GetFields, GetSections, DeleteField, DeleteSection - Remove McpTool and Schema attributes - Move descriptions to method docblocks
- Convert final 6 tools: CreateEntryType, CreateField, UpdateEntry, UpdateEntryType, UpdateField, UpdateFieldLayout - All 25 tools now use PHPStan docblock types instead of MCP Schema attributes - Remove all McpTool and Schema attributes from all tool files - Maintain proper PHPStan type annotations in @param and @return tags - Keep human-readable parameter descriptions as inline comments All tools now follow the established pattern documented in AGENTS.md
- Add 5 new controllers (Fields, Entries, Drafts, FieldLayouts, Sites) - Register 30+ new API routes in Plugin.php - Create comprehensive HTTP API documentation - All endpoints follow consistent RESTful pattern - Automatic parameter validation via Valinor - Zero code duplication - delegates to existing tool classes Controllers: - FieldsController: create, list, update, delete, get types - EntriesController: create, get, search, update, delete - DraftsController: create, update, apply - FieldLayoutsController: create, get, update - SitesController: list Documentation: - docs/http-api.md: Complete API reference with examples - docs/routes.md: Quick reference table of all routes - docs/http-endpoints-implementation.md: Implementation details - SKILLS.md: Updated with comprehensive endpoint documentation All 25 tools from src/tools/ now accessible via RESTful HTTP API
- Reduce SKILLS.md from 787 to 119 lines (~85% token reduction)
- Add concise 2-3 sentence summaries for each of 25 MCP tools
- Create SKILLS/ directory with detailed documentation per tool
- Organize tools into 6 logical categories:
* Content Management (5 tools)
* Draft Management (3 tools)
* Section Management (4 tools)
* Entry Type Management (4 tools)
* Field Management (5 tools)
* Field Layout Management (3 tools)
* Site Management (1 tool)
Each SKILLS/{tool}.md file includes:
- Complete parameter specifications
- Return value documentation
- JSON usage examples
- Best practices and notes
Benefits:
- Minimal token usage for overview queries
- Complete details available when needed
- Better organization and navigation
- Easier maintenance per tool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.