{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "mcpActions": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Display name for the MCP server. Defaults to \"backstage\". Used when running a single bundled server without mcpActions.servers."
        },
        "description": {
          "type": "string",
          "description": "Description of the MCP server. Used when running a single bundled server without mcpActions.servers."
        },
        "instructions": {
          "type": "string",
          "description": "Instructions describing how clients should use the MCP server. Used when running a single bundled server without mcpActions.servers."
        },
        "namespacedToolNames": {
          "type": "boolean",
          "description": "When true, MCP tool names include the plugin ID prefix to avoid collisions across plugins. For example an action registered as \"get-entity\" by the catalog plugin becomes \"catalog.get-entity\". Defaults to true."
        },
        "tracing": {
          "type": "object",
          "properties": {
            "capture": {
              "type": "object",
              "properties": {
                "toolPayload": {
                  "type": "boolean",
                  "description": "When true, the MCP tool call's input arguments and output result are included on the MCP `tools/call` server span as `gen_ai.tool.call.arguments` and `gen_ai.tool.call.result`. These attributes are marked Opt-In by the OpenTelemetry GenAI semantic conventions because they may contain sensitive information (entity payloads, scaffolder inputs, free-form text). Defaults to false."
                }
              }
            }
          }
        },
        "servers": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Display name for the MCP server."
              },
              "description": {
                "type": "string",
                "description": "Description of the MCP server."
              },
              "instructions": {
                "type": "string",
                "description": "Instructions describing how clients should use the MCP server."
              },
              "filter": {
                "type": "object",
                "properties": {
                  "include": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Glob pattern matched against action ID."
                        },
                        "attributes": {
                          "type": "object",
                          "properties": {
                            "destructive": {
                              "type": "boolean"
                            },
                            "readOnly": {
                              "type": "boolean"
                            },
                            "idempotent": {
                              "type": "boolean"
                            }
                          },
                          "description": "Match actions by their attribute flags."
                        }
                      }
                    }
                  },
                  "exclude": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Glob pattern matched against action ID."
                        },
                        "attributes": {
                          "type": "object",
                          "properties": {
                            "destructive": {
                              "type": "boolean"
                            },
                            "readOnly": {
                              "type": "boolean"
                            },
                            "idempotent": {
                              "type": "boolean"
                            }
                          },
                          "description": "Match actions by their attribute flags."
                        }
                      }
                    }
                  }
                },
                "description": "Filter rules to include or exclude specific actions."
              }
            },
            "required": [
              "name"
            ]
          },
          "description": "Named MCP servers, each exposed at /api/mcp-actions/v1/{key}. These are subsets of the default server at /api/mcp-actions/v1, which is always exposed and always serves every registered action."
        }
      }
    }
  }
}
