Skip to content

Commit a74ac56

Browse files
committed
patch
1 parent e1c0c8e commit a74ac56

6 files changed

Lines changed: 13 additions & 4 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agent-swarm-kit",
3-
"version": "1.1.133",
3+
"version": "1.1.134",
44
"description": "A TypeScript library for building orchestrated framework-agnostic multi-agent AI systems",
55
"author": {
66
"name": "Petr Tripolsky",

src/client/ClientAgent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const createToolCall = async (
126126
toolId: tool.id,
127127
clientId: self.params.clientId,
128128
agentName: self.params.agentName,
129+
toolName: tool.function.name,
129130
params: tool.function.arguments,
130131
isLast: idx === toolCalls.length - 1,
131132
abortSignal: self._toolAbortController.signal,

src/interfaces/Agent.interface.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export interface IAgentTool<T = Record<string, ToolValue>> {
125125
* @param {string} dto.toolId - The unique `tool_call_id` for tracking in OpenAI-style history.
126126
* @param {string} dto.clientId - The ID of the client invoking the tool.
127127
* @param {AgentName} dto.agentName - The name of the agent using the tool.
128+
* @param {ToolName} dto.toolName - The name of the tool associated with the tool call
128129
* @param {T} dto.params - The parameters for the tool execution.
129130
* @param {IToolCall[]} dto.toolCalls - The list of tool calls in the current execution context.
130131
* @param {boolean} dto.isLast - Indicates if this is the last tool call in a sequence.
@@ -135,6 +136,7 @@ export interface IAgentTool<T = Record<string, ToolValue>> {
135136
toolId: string;
136137
clientId: string;
137138
agentName: AgentName;
139+
toolName: ToolName;
138140
params: T;
139141
toolCalls: IToolCall[];
140142
abortSignal: TAbortSignal;

src/interfaces/MCP.interface.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IToolCall } from "../model/Tool.model";
2-
import { AgentName, TAbortSignal } from "./Agent.interface";
2+
import { AgentName, TAbortSignal, ToolName } from "./Agent.interface";
33
import { IBus } from "./Bus.interface";
44
import { ILogger } from "./Logger.interface";
55

@@ -34,6 +34,8 @@ export interface IMCPToolCallDto<T extends MCPToolValue = MCPToolValue> {
3434
clientId: string;
3535
/** Name of the agent associated with the tool call. */
3636
agentName: AgentName;
37+
/** Name of the tool associated with the tool call */
38+
toolName: ToolName;
3739
/** Parameters for the tool call. */
3840
params: T;
3941
/** Array of tool calls associated with this request. */

types.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3556,6 +3556,8 @@ interface IMCPToolCallDto<T extends MCPToolValue = MCPToolValue> {
35563556
clientId: string;
35573557
/** Name of the agent associated with the tool call. */
35583558
agentName: AgentName;
3559+
/** Name of the tool associated with the tool call */
3560+
toolName: ToolName;
35593561
/** Parameters for the tool call. */
35603562
params: T;
35613563
/** Array of tool calls associated with this request. */
@@ -3770,6 +3772,7 @@ interface IAgentTool<T = Record<string, ToolValue>> {
37703772
* @param {string} dto.toolId - The unique `tool_call_id` for tracking in OpenAI-style history.
37713773
* @param {string} dto.clientId - The ID of the client invoking the tool.
37723774
* @param {AgentName} dto.agentName - The name of the agent using the tool.
3775+
* @param {ToolName} dto.toolName - The name of the tool associated with the tool call
37733776
* @param {T} dto.params - The parameters for the tool execution.
37743777
* @param {IToolCall[]} dto.toolCalls - The list of tool calls in the current execution context.
37753778
* @param {boolean} dto.isLast - Indicates if this is the last tool call in a sequence.
@@ -3780,6 +3783,7 @@ interface IAgentTool<T = Record<string, ToolValue>> {
37803783
toolId: string;
37813784
clientId: string;
37823785
agentName: AgentName;
3786+
toolName: ToolName;
37833787
params: T;
37843788
toolCalls: IToolCall[];
37853789
abortSignal: TAbortSignal;

0 commit comments

Comments
 (0)