Annotation Interface Tool


  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    static @interface 
    The _meta property/parameter is reserved by MCP to allow clients and servers to attach additional metadata to their interactions.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Additional hints for clients.
    Tree expression (Jenkins Remote REST API tree syntax) applied when the client does not supply the tree parameter.
    The description of the tool.
    To add some _meta content to the tool.
    The name of the tool.
    boolean
    Set to true to replace another tool that has the same name, such as a built-in tool.
    Permission ids (see Permission.getId(), e.g.
    boolean
    If true, the tool's output will be treated as a structured object and serialized into the `structuredContent` field.
    boolean
    If true, the tool's output will be filtered follow Jenkins rest api tree pruning feature.
  • Element Details

    • name

      String name
      The name of the tool. If not provided, the method name will be used.
      Default:
      ""
    • override

      boolean override
      Set to true to replace another tool that has the same name, such as a built-in tool.

      Overriding only happens when you ask for it. If two tools share a name and neither sets override = true, the first one wins and the other is ignored with a warning. If several tools set override = true for the same name, the one from the extension with the highest ordinal wins.

      Default:
      false
    • description

      String description
      The description of the tool. If not provided, the method name will be used.
      Default:
      ""
    • structuredOutput

      boolean structuredOutput
      If true, the tool's output will be treated as a structured object and serialized into the `structuredContent` field.
      Default:
      false
    • treePruneSupported

      boolean treePruneSupported
      If true, the tool's output will be filtered follow Jenkins rest api tree pruning feature. Any elements marked with @ExportedBean support tree pruning automatically.
      Default:
      false
    • permissions

      String[] permissions
      Permission ids (see Permission.getId(), e.g. "hudson.model.Hudson.SystemRead") the caller must hold at least one of, or the tool is hidden and cannot be called. When Jenkins security is off, the tool is always available.

      These are overall permissions, checked against the Jenkins root. Item-level permissions (like Item.READ on one folder or job) don't fit here and must be checked inside the tool method.

      Default:
      {}
    • defaultTree

      String defaultTree
      Tree expression (Jenkins Remote REST API tree syntax) applied when the client does not supply the tree parameter. Keeps default responses compact for LLM contexts; clients can still pass their own tree (or tree="*" semantics via a broad expression) to request more fields. Empty (the default) preserves the current behaviour of returning the full exported model.
      Default:
      ""
    • metas

      Tool.Meta[] metas
      To add some _meta content to the tool.
      Default:
      {@io.jenkins.plugins.mcp.server.annotation.Tool.Meta}
    • annotations

      Tool.Annotations annotations
      Additional hints for clients. There is no default value for this. If you need it you need to explicitly add it.
      Default:
      @io.jenkins.plugins.mcp.server.annotation.Tool.Annotations