Skip to content

Commit c5795bb

Browse files
committed
pangea-node-sdk: add mcp_tools field to AI Guard
1 parent 644db79 commit c5795bb

File tree

3 files changed

+62
-22
lines changed

3 files changed

+62
-22
lines changed

packages/pangea-node-sdk/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### Added
11+
12+
- AI Guard: `mcp_tools` field.
13+
1014
## 5.4.0 - 2025-09-12
1115

1216
## Added

packages/pangea-node-sdk/src/types.ts

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -946,9 +946,9 @@ export namespace AIGuard {
946946
debug?: boolean;
947947
overrides?: GuardOverrides2;
948948

949-
/** Id of source application. */
949+
/** Id of source application/agent */
950950
app_id?: string;
951-
/** User/Service account id. */
951+
/** User/Service account id/service account */
952952
actor_id?: string;
953953
/** Underlying LLM. Example: 'OpenAI'. */
954954
llm_provider?: string;
@@ -967,30 +967,48 @@ export namespace AIGuard {
967967
/** For gateway-like integrations with multi-tenant support. */
968968
tenant_id?: string;
969969
/** (AIDR) Event Type. */
970-
event_type?: "input" | "output";
971-
/** (AIDR) sensor instance id. */
972-
sensor_instance_id?: string;
970+
event_type?:
971+
| "input"
972+
| "output"
973+
| "tool_input"
974+
| "tool_output"
975+
| "tool_listing";
976+
/** (AIDR) collector instance id. */
977+
collector_instance_id?: string;
973978
/** (AIDR) Logging schema. */
974979
extra_info?: {
975-
/** Name of source application. */
980+
/** Name of source application/agent. */
976981
app_name?: string;
977-
/** The group of source application. */
982+
/** The group of source application/agent. */
978983
app_group?: string;
979-
/** Version of the source application. */
984+
/** Version of the source application/agent. */
980985
app_version?: string;
981-
/** Name of subject actor. */
986+
/** Name of subject actor/service account. */
982987
actor_name?: string;
983988
/** The group of subject actor. */
984989
actor_group?: string;
985990
/** Geographic region or data center. */
986991
source_region?: string;
987-
/** Sensitivity level of data involved */
988-
data_sensitivity?: string;
989-
/** Tier of the user or organization */
990-
customer_tier?: string;
991-
/** Business-specific use case */
992-
use_case?: string;
993-
[key: string]: unknown | string | undefined;
992+
/** Sub tenant of the user or organization */
993+
sub_tenant?: string;
994+
/**
995+
* MCP tools grouped by server. Each item groups tools for a given MCP
996+
* server.
997+
*/
998+
mcp_tools?: {
999+
/** MCP server name */
1000+
server_name: string;
1001+
tools: string[];
1002+
}[];
1003+
[key: string]:
1004+
| unknown
1005+
| string
1006+
| {
1007+
/** MCP server name */
1008+
server_name: string;
1009+
tools: string[];
1010+
}[]
1011+
| undefined;
9941012
};
9951013
/** Provide input and output token count. */
9961014
count_tokens?: boolean;

packages/pangea-node-sdk/tests/testdata/ai-guard.openapi.json

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,13 +1707,31 @@
17071707
},
17081708
"mcp_tools": {
17091709
"type": "array",
1710-
"title": "List of MCP tools",
1711-
"description": "Each item is <mcp_servername>:<tool_name>",
1712-
"uniqueItems": true,
1710+
"title": "MCP tools grouped by server",
1711+
"description": "Each item groups tools for a given MCP server.",
17131712
"items": {
1714-
"type": "string",
1715-
"description": "Formatted mcp service and tools name <mcp_servername>:<tool_name>"
1716-
}
1713+
"type": "object",
1714+
"additionalProperties": false,
1715+
"required": ["server_name", "tools"],
1716+
"properties": {
1717+
"server_name": {
1718+
"type": "string",
1719+
"minLength": 1,
1720+
"description": "MCP server name"
1721+
},
1722+
"tools": {
1723+
"type": "array",
1724+
"minItems": 1,
1725+
"uniqueItems": true,
1726+
"items": {
1727+
"type": "string",
1728+
"minLength": 1,
1729+
"description": "Tool name"
1730+
}
1731+
}
1732+
}
1733+
},
1734+
"uniqueItems": true
17171735
}
17181736
},
17191737
"additionalProperties": true

0 commit comments

Comments
 (0)