From 828d3d4282a80ce091fee830945dac8ec003f648 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Tue, 19 May 2026 09:23:35 +0200 Subject: [PATCH] Put tool payload capture config under plugin namespace Signed-off-by: Eric Peterson --- docs/ai/mcp-actions.md | 6 ++--- plugins/mcp-actions-backend/config.d.ts | 32 +++++++++++------------ plugins/mcp-actions-backend/src/plugin.ts | 5 ++-- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/docs/ai/mcp-actions.md b/docs/ai/mcp-actions.md index 187f4384d1..c22f1032ff 100644 --- a/docs/ai/mcp-actions.md +++ b/docs/ai/mcp-actions.md @@ -326,13 +326,13 @@ This flag is honored by every plugin that creates spans through the [Tracing Ser ### Capturing tool arguments and results -When `backend.tracing.capture.mcpActionsToolPayloads` is enabled, the tool's input arguments and output result are recorded on the span as `gen_ai.tool.call.arguments` and `gen_ai.tool.call.result`. +When `mcpActions.tracing.capture.toolPayload` is enabled, the tool's input arguments and output result are recorded on the span as `gen_ai.tool.call.arguments` and `gen_ai.tool.call.result`. ```yaml title="app-config.yaml" -backend: +mcpActions: tracing: capture: - mcpActionsToolPayloads: true # defaults to false + toolPayload: true # defaults to false ``` :::warning diff --git a/plugins/mcp-actions-backend/config.d.ts b/plugins/mcp-actions-backend/config.d.ts index cf70e187ad..ffb9d23571 100644 --- a/plugins/mcp-actions-backend/config.d.ts +++ b/plugins/mcp-actions-backend/config.d.ts @@ -15,23 +15,6 @@ */ export interface Config { - backend?: { - tracing?: { - capture?: { - /** - * 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. - */ - mcpActionsToolPayloads?: boolean; - }; - }; - }; - mcpActions?: { /** * Display name for the MCP server. Defaults to "backstage". @@ -53,6 +36,21 @@ export interface Config { */ namespacedToolNames?: boolean; + tracing?: { + capture?: { + /** + * 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. + */ + toolPayload?: boolean; + }; + }; + /** * Named MCP servers, each exposed at /api/mcp-actions/v1/{key}. * When not configured, the plugin serves a single server at /api/mcp-actions/v1. diff --git a/plugins/mcp-actions-backend/src/plugin.ts b/plugins/mcp-actions-backend/src/plugin.ts index bbc2c6719d..65e15f504d 100644 --- a/plugins/mcp-actions-backend/src/plugin.ts +++ b/plugins/mcp-actions-backend/src/plugin.ts @@ -68,9 +68,8 @@ export const mcpPlugin = createBackendPlugin({ 'mcpActions.namespacedToolNames', ); const captureToolPayloads = - config.getOptionalBoolean( - 'backend.tracing.capture.mcpActionsToolPayloads', - ) ?? false; + config.getOptionalBoolean('mcpActions.tracing.capture.toolPayload') ?? + false; const mcpService = await McpService.create({ actions,