easy_api_annotations 1.1.0
easy_api_annotations: ^1.1.0 copied to clipboard
Dart annotations for exposing library methods as MCP tools.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.1.0 - 2026-05-20 #
Added #
- Added
@Promptannotation for marking methods as MCP prompt templates. Prompts are user-invoked templates that generate structured messages for interacting with language models (e.g., as slash commands). - Added
@PromptArgumentannotation for providing rich metadata on prompt arguments, including custom names, titles, descriptions, and requirement status. - Added
PromptResultclass for returning prompt messages from @Prompt methods. - Added
PromptMessageclass representing a single message with a role and content. - Added
PromptRoleenum withuserandassistantvalues. - Added sealed
PromptContentclass hierarchy:TextPromptContentfor plain text messagesImagePromptContentfor base64-encoded imagesAudioPromptContentfor base64-encoded audioResourcePromptContentfor embedded server resources
- Added comprehensive DartDoc comments with examples for all prompt types.
1.0.0 - 2026-05-08 #
First stable release. The annotation surface is now considered API-stable; future breaking changes will follow semver.
Added #
- Added
ToolAnnotationsclass for describing tool behavior to MCP clients via hint properties:title,readOnlyHint,destructiveHint,idempotentHint, andopenWorldHint. Clients can use these hints to auto-approve safe read-only calls or prompt for confirmation on destructive operations. - Added
Tool.annotationsfield for attachingToolAnnotationsto individual tools. - Added
Server.annotationsDefaultfield for server-wide default annotation hints. The 4 boolean hints cascade from server defaults to every generated tool; tool-level values take precedence for the same key, andtitleis never inherited (it is intentionally tool-specific). - Documented
ToolAnnotationsmerge semantics in DartDoc with worked examples.
Changed #
- Bumped package version to 1.0.0 to signal API stability.
- Expanded
@ToolDartDoc withannotationsparameter usage examples.
0.6.0 - 2026-04-30 #
Added #
- Added canonical
lib/easy_api_annotations.dartentry point that re-exportsmcp_annotations.dart. Consumers can now use the conventionalimport 'package:easy_api_annotations/easy_api_annotations.dart'— the legacymcp_annotations.dartimport still works.
Changed #
- Clarified the
Parameter.sensitivedartdoc to describe the concrete effect in generated artifacts (—x-sensitive+format: 'password'in.mcp.json,writeOnly: true+format: 'password'in.openapi.json). Previously the docstring promised masking behavior the generator did not actually implement. - Renamed
@Mcpannotation to@Server— new primary annotation name - Renamed
generateOpenApiparameter togenerateRest - Added
generateMcpparameter (default: true) - Added
generateRestparameter (default: false) - Marked
@Server,@Tool, and@Parameteras@immutableto document intent and catch accidental mutation - Lowered SDK constraint to
^3.9.0to matcheasy_api_generator - Fixed doc mismatch on
@Server.addressdefault (it is'127.0.0.1', not'localhost')
Removed #
- Dropped the unused direct
analyzerdependency — the annotations package no longer pulls analyzer into consumer projects - Removed the public
package:easy_api_annotations/stubs.dartlibrary; it was dead code and shipped types that duplicatedpackage:meta - Removed the long-deprecated
Tool.executionfield (was a rawMap<String, Object?>?reserved for a future feature)
Deprecated #
@Mcptypedef — still available for backward compatibility, emits deprecation warning
0.5.0 - 2026-04-18 #
Added #
- Added
generateOpenApiparameter to@Mcpannotation for OpenAPI 3.0 specification generation - Comprehensive DartDoc for the new parameter
0.4.2 - 2026-04-15 #
Changed #
- Updated README with absolute logo URL for pub.dev compatibility
- Added Buy Me a Coffee image button
- Added reference to easy_api_generator package in installation section
0.4.1 - 2026-04-15 #
Added #
- Added
autoClassPrefixparameter documentation to SKILL.md - Updated skill documentation with examples for all naming options
0.4.0 - 2026-04-15 #
Added #
- Added
autoClassPrefixparameter to@Mcpannotation - When enabled, tool names are automatically prefixed with their class name (e.g.,
UserService_createUser) - Can be combined with
toolPrefixfor even more organization (e.g.,api_UserService_createUser) - Disabled by default for backward compatibility
0.3.0 - 2026-04-15 #
Added #
- Added
nameparameter to@Toolannotation for custom tool names - Added
toolPrefixparameter to@Mcpannotation for prefixing all tool names in a scope - Updated documentation with examples for custom tool naming
0.2.1 - 2026-04-14 #
Fixed #
- Updated repository and homepage URLs to point to package-specific directories
0.2.0 - 2026-04-14 #
Added #
- Added
@Parameterannotation for rich parameter metadata- Support for
title,description,examplefields - Support for validation constraints:
minimum,maximum,pattern,enumValues - Support for
sensitiveflag to mark sensitive data
- Support for
- Updated documentation with
@Parameterusage examples - Clarified that
@Parameterannotation is optional