Skip to content

Tool and resource conventions: the tool provider extension point, structured results, the schema resource and read-only tools #2504

Closed

Description

@pournasserian

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 a Result, 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 as FieldSettingsReader does 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):
  • Built-in resources: fluentcms://schema, the site's schema document, and the template fluentcms://schema/{slug}, one type's.
  • CONTRIBUTING.md: the conventions, under "Extension points".

Out of scope

Acceptance

  • Over HTTP and stdio, tools/list returns the five tools, each with a description, an input schema and the read-only annotation.
  • list_content_types lists each type's id, slug, name and version. get_content_type returns the entity flag, the fields and the definition at the current version or at a named one.
  • get_schema_document returns the same document as ISchemaDocuments, for the site or for one type.
  • get_change_set returns a stored set with its operations and state, and get_change_set_diff its 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/list and resources/templates/list show 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 -warnaserror passes, and ProjectReferenceRulesTests pass: Core gains no package, and Mcp references only Core.

Activity

  1. added a commit that references this issue on Oct 18, 2026
    87200ef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew capabilityv2FluentCMS v2 (v2 branch)

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions