Put tool payload capture config under plugin namespace

Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
This commit is contained in:
Eric Peterson
2026-05-19 09:23:35 +02:00
parent 0422010a37
commit 828d3d4282
3 changed files with 20 additions and 23 deletions
+15 -17
View File
@@ -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.
+2 -3
View File
@@ -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,