这是indexloc提供的服务,不要输入任何密码
Skip to content

Refactor annotation normalization vs validation behaviour and emit diagnostics for invalid annotations #96

@galatanovidiu

Description

@galatanovidiu

Problem statement

Annotation mapping code (e.g., in McpAnnotationMapper) currently performs normalization (conversion of ability annotations into MCP tool/resource/prompt metadata) and silently returns null (dropping invalid values) when values cannot be converted.
Meanwhile, stricter validation is toggled by mcp_adapter_validation_enabled. The behavior is not clearly documented, and invalid annotation fields are dropped without diagnostics or developer feedback.

Why this matters

  • Developers may supply annotation metadata that they believe is being processed—yet invalid values get silently dropped with no warning, making debugging difficult.
  • Distinction between “normalization” (best-effort conversion) vs “validation” (enforcement of schema/types) is blurred.
  • Without diagnostics (warnings/errors), it’s difficult to trace where annotation data is lost or mis-handled.

Discussion opened on PR #91 (comments)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions