agentleFS
dart-langdart-lang/ai/.agents/skills/update-mcp-spec-version/SKILL.md

update-mcp-spec-version

Skill292 starsChanged 26 days agoBSD-3-ClauseView on GitHub

Instructions for updating the supported Model Context Protocol (MCP) specification version in the `dart_mcp` package.

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 10 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read Model Context Protocol LLM Resources to find relevant documentation links for the new version.

    line 14
  2. Distinctive:

    Use your tools fetch the content of the linked changelogs, schemas, and specification documents.

    line 15
  3. Distinctive:

    CRITICAL: Do NOT invent APIs or assume changes based on partial information.

    line 17
  4. Very specific:

    Add the new version to the ProtocolVersion enum.

    line 22
  5. Very specific:

    Update ProtocolVersion.latestSupported to the new version.

    line 29
  6. Very specific:

    Search the codebase for the _previous_ spec version string (e.g., 2024-11-05) or the regex specification/\d{4}-\d{2}-\d{2}.

    line 35
  7. Distinctive:

    Update URLs in comments to point to the new spec version.

    line 36
  8. Very specific:

    Update lib/src/api/api.dart as needed, for new features typically you should add a new part file to keep the codebase organized.

    line 44
  9. Very specific:

    Important: When implementing numeric fields from the schema, use num (or num?

    line 46
  10. Very specific:

    Ensure that you update the capabilities inside of initialize when implementing new features.

    line 50
  11. Distinctive:

    Write tests for the new features.

    line 56
  12. Distinctive:

    Update any existing tests as needed, make sure to have good coverage of all features.

    line 57
  13. Distinctive:

    If you notice missing tests for existing features, feel free to add those as well.

    line 58
  14. Very specific:

    Run tests in pkgs/dart_mcp and pkgs/dart_mcp_server to ensure no regressions.

    line 61
  15. Distinctive:

    Run the updated examples and ensure they work as expected.

    line 62
  16. Distinctive:

    Run the dart formatter and analyzer, to ensure the code is well-formatted and free of lint errors.

    line 63
  17. Distinctive:

    Update this skill with any additional steps you performed or insights you gained during the update process.

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Update MCP Spec Version

This skill guides you through the process of updating the dart_mcp package to support a new version of the Model Context Protocol (MCP) specification.

Steps

  1. Review the New Specification:
    • Read Model Context Protocol LLM Resources to find relevant documentation links for the new version.
    • Use your tools fetch the content of the linked changelogs, schemas, and specification documents.
    • Identify all changes introduced in the new version (new types, fields, deprecated items, new features, etc).
    • CRITICAL: Do NOT invent APIs or assume changes based on partial information. Every change MUST be backed by the actual schema or specification text. If you cannot find the schema, pause and ask the user for guidance.
    • Pay special attention to the schema changes as these are the source of truth.
  2. Update the Protocol Version:
    • Open pkgs/dart_mcp/lib/src/api/api.dart.
    • Add the new version to the ProtocolVersion enum.
      enum ProtocolVersion {
        // ...
        vYYYY_MM_DD('YYYY-MM-DD'),
      }
    • Update ProtocolVersion.latestSupported to the new version.
      static const latestSupported = ProtocolVersion.vYYYY_MM_DD;
  3. Update Documentation URLs:
    • Search the codebase for the previous spec version string (e.g., 2024-11-05) or the regex specification/\d{4}-\d{2}-\d{2}.
    • Update URLs in comments to point to the new spec version.
    • Key files to check:
      • pkgs/dart_mcp/lib/src/client/sampling_support.dart
      • pkgs/dart_mcp/lib/src/server/server.dart
      • pkgs/dart_mcp/README.md
  4. Implement Schema Changes:
    • Review the schema for new types or fields by comparing the various part files included by lib/src/api/api.dart against the schema. If you cannot find the schema, pause and ask the user for guidance. All changes must be backed by the real schema.
    • Update lib/src/api/api.dart as needed, for new features typically you should add a new part file to keep the codebase organized.
    • Whenever referencing map keys, use constant values from lib/src/utils/names.dart, adding any new constants that you need. Do not use string literals for map keys.
    • Important: When implementing numeric fields from the schema, use num (or num? for optional fields) instead of int or double, unless the schema explicitly constraints the value to be an integer. The JSON schema number type can be either an integer or floating-point value.
  5. Update Client/Server Implementations:
    • See the support files under pkgs/dart_mcp/lib/src/client/ and pkgs/dart_mcp_server/lib/src/server/ for examples of how to implement features.
    • Ensure that you update the capabilities inside of initialize when implementing new features.
  6. Update Examples:
    • See the existing examples under pkgs/dart_mcp/example/, and either update the existing ones or add new ones as appropriate.
  7. Write and Update Tests:
    • Write tests for the new features. See the existing tests as an example and follow the same style.
    • Update any existing tests as needed, make sure to have good coverage of all features.
    • If you notice missing tests for existing features, feel free to add those as well.
  8. Verify:
    • Run tests in pkgs/dart_mcp and pkgs/dart_mcp_server to ensure no regressions.
    • Run the updated examples and ensure they work as expected.
    • Run the dart formatter and analyzer, to ensure the code is well-formatted and free of lint errors.
    • Walk the user through all the changes you made and describe your reasoning.
  9. Update Version and CHANGELOG.md:
    • Open pkgs/dart_mcp/pubspec.yaml and update the version according to whether this was a breaking change
    • Open pkgs/dart_mcp/CHANGELOG.md and add a version entry for the new version if one doesn't already exist, mentioning the update to the new MCP spec version and any relevant changes. For breaking changes preface them with Breaking:.
  10. Update This Skill:
    • Update this skill with any additional steps you performed or insights you gained during the update process.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.