Class DefaultMetaProvider

java.lang.Object
org.springframework.ai.mcp.annotation.context.DefaultMetaProvider
All Implemented Interfaces:
MetaProvider

public class DefaultMetaProvider extends Object implements MetaProvider
Default MetaProvider implementation that disables the "_meta" field in tool, prompt, resource declarations.

This provider deliberately returns null from getMeta() to signal that no "_meta" information is included.

Use this when your tool, prompt, or resource does not need to expose any meta information or you want to keep responses minimal by default.

Author:
Vadzim Shurmialiou, Craig Walls
  • Constructor Details

    • DefaultMetaProvider

      public DefaultMetaProvider()
  • Method Details

    • getMeta

      public Map<String,Object> getMeta()
      Returns null to indicate that no "_meta" field should be included in.
      Specified by:
      getMeta in interface MetaProvider
      Returns:
      A Map containing metadata key-value pairs, where keys are strings and values can be any object type.