Closed
Labels
Milestone
Description
Part of #2423 (F-MCP). The tool and resource conventions every capability epic builds its tools on (MCP-02, MCP-03, UX-03), with the first read-only tools for content types and change sets. Tool providers are an extension point (F-EXT #2429, EXT-01), so built-in tools register the same way a plugin's will. Agents authenticate since #2485 and every call is logged since #2488, so tools can now land.
Scope
- Core (
FluentCMS.Core.Tools):[ExtensionPoint] IToolProvider: the tools of one capability. A tool has a snake_case name, a title, a description written for an LLM reader, a JSON Schema for its input with a description on every argument, a read-only flag and a handler.[ExtensionPoint] IResourceProvider: resources by URI or URI template (MCP-03), with a name, a description, a media type and a handler.ToolResult: a structured JSON value, or the errors of aResult, each with a code and a message that says what to change (UX-03).ToolArgumentsReader: reads required and optional arguments and reports a missing, malformed or unknown argument by name, so an agent's typo comes back as an error instead of being ignored. It works asFieldSettingsReaderdoes for field settings.ToolProviderConformanceTests, which every provider passes, built-in or plugin: unique snake_case names, a described input schema that refuses unknown arguments, and a description for every tool and argument.
- Mcp maps every registered tool and resource onto the SDK on both transports.
- Tools carry the read-only annotation.
- A success returns the value as structured content and as JSON text.
- A failure is a tool error (
isError) with{"errors": [{"code", "message"}]}in both forms, never a protocol error.
- Built-in tools (
FluentCMS.Core.Builtin):list_content_typesget_content_type(slug, optional version)get_schema_document(optional slug; the site's document without one, SCH-06, Add the schema document with field descriptions and examples #2473)get_change_set(id)get_change_set_diff(id, CHG-03)
- Built-in resources:
fluentcms://schema, the site's schema document, and the templatefluentcms://schema/{slug}, one type's. - CONTRIBUTING.md: the conventions, under "Extension points".
Out of scope
- Write tools for content types and change sets, including session grouping: the next slice. Agents never approve or publish (MCP-06), so no such tool exists.
- Bulk operations with a change set id and progress, and the MCP-01 coverage test (MCP-08, MCP-01).
- Tools and resources for entries and entities: the F-CNT (F-CNT: Entries with versions, states and entity references #2416) and F-ENT (F-ENT: Entity registry with sources, validity and blast radius #2417) lanes add them on these conventions.
- Rule hints in descriptions and the active-rules resource: after F-RUL (F-RUL: Rule book as versioned content #2419).
- Scope checks on reads: with the agent scopes, in the credentials lane of F-MCP: MCP server, agent credentials, scopes and caps #2423.
Acceptance
- Over HTTP and stdio,
tools/listreturns the five tools, each with a description, an input schema and the read-only annotation. list_content_typeslists each type's id, slug, name and version.get_content_typereturns the entity flag, the fields and the definition at the current version or at a named one.get_schema_documentreturns the same document asISchemaDocuments, for the site or for one type.get_change_setreturns a stored set with its operations and state, andget_change_set_diffits field-level diff.- An unknown slug, version or change set is a tool error with the service's code and a message that says how to find a valid one.
- A missing, malformed or unknown argument is a tool error that names the argument and the form it takes, and the service is not called.
resources/listandresources/templates/listshow the schema resources. Reading one returns the JSON document, and an unknown slug is an error.- Every built-in provider passes the conformance tests, and two tools with one name are refused at startup.
- Everything above passes on SQLite and PostgreSQL,
dotnet build -warnaserrorpasses, andProjectReferenceRulesTestspass: Core gains no package, and Mcp references only Core.
Activity
Add the tool and resource conventions with the first read-only tools (#…