@@ -759,13 +759,14 @@ export class AgentSession {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all configured tools with name, description, parameter schema, and source metadata.
|
||||
* Get all configured tools with name, description, parameter schema, prompt guidelines, and source metadata.
|
||||
*/
|
||||
getAllTools(): ToolInfo[] {
|
||||
return Array.from(this._toolDefinitions.values()).map(({ definition, sourceInfo }) => ({
|
||||
name: definition.name,
|
||||
description: definition.description,
|
||||
parameters: definition.parameters,
|
||||
promptGuidelines: definition.promptGuidelines,
|
||||
sourceInfo,
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -1213,7 +1213,7 @@ export interface ExtensionAPI {
|
||||
/** Get the list of currently active tool names. */
|
||||
getActiveTools(): string[];
|
||||
|
||||
/** Get all configured tools with parameter schema and source metadata. */
|
||||
/** Get all configured tools with parameter schema, prompt guidelines, and source metadata. */
|
||||
getAllTools(): ToolInfo[];
|
||||
|
||||
/** Set the active tools by name. */
|
||||
@@ -1424,8 +1424,8 @@ export type GetSessionNameHandler = () => string | undefined;
|
||||
|
||||
export type GetActiveToolsHandler = () => string[];
|
||||
|
||||
/** Tool info with name, description, parameter schema, and source metadata */
|
||||
export type ToolInfo = Pick<ToolDefinition, "name" | "description" | "parameters"> & {
|
||||
/** Tool info with name, description, parameter schema, prompt guidelines, and source metadata. */
|
||||
export type ToolInfo = Pick<ToolDefinition, "name" | "description" | "parameters" | "promptGuidelines"> & {
|
||||
sourceInfo: SourceInfo;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user