@slashfi/agents-sdk 0.36.4 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/server.ts CHANGED
@@ -488,7 +488,7 @@ function getToolDefinitions(schemas?: AgentServerOptions["schemas"]) {
488
488
  {
489
489
  name: "call_agent",
490
490
  description:
491
- "Execute a tool on a registered agent. Provide the agent path and tool name.\n\nSupported actions:\n- invoke: Fire-and-forget agent invocation\n- ask: Invoke and wait for response\n- execute_tool: Call a specific tool on an agent\n- describe_tools: Get tool schemas for an agent\n- load: Get agent definition/system prompt\n- list_resources: List all resources available on an agent (docs, auth instructions, config schemas, etc.)\n- read_resources: Fetch one or more resources by URI",
491
+ "Execute a tool on a registered agent. Provide the agent path and tool name.\n\nSupported actions:\n- invoke: Fire-and-forget agent invocation\n- ask: Invoke and wait for response\n- execute_tool: Call a specific tool on an agent\n- describe_tools: Get tool schemas for an agent (slim by default; use full: true for complete schemas)\n- load: Get agent definition/system prompt\n- list_resources: List all resources available on an agent (docs, auth instructions, config schemas, etc.)\n- read_resources: Fetch one or more resources by URI",
492
492
  inputSchema: schemas?.callAgent
493
493
  ? zodToOpenAiJsonSchema(schemas.callAgent)
494
494
  : callAgentInputSchema,
package/src/types.ts CHANGED
@@ -646,6 +646,17 @@ export interface ToolSchema {
646
646
  outputSchema?: JsonSchema;
647
647
  }
648
648
 
649
+ /**
650
+ * Slim tool summary for describe_tools when full=false (default).
651
+ * Omits verbose inputSchema/outputSchema to save context tokens.
652
+ */
653
+ export interface ToolSchemaSummary {
654
+ name: string;
655
+ description: string;
656
+ /** Estimated token count if full schema were returned for this tool */
657
+ fullTokens: number;
658
+ }
659
+
649
660
  // ============================================
650
661
  // Agent Definition
651
662
  // ============================================
@@ -749,13 +760,18 @@ export interface CallAgentExecuteToolResponse {
749
760
  /** Success response for describe_tools */
750
761
  export interface CallAgentDescribeToolsResponse {
751
762
  success: true;
752
- tools: ToolSchema[];
763
+ /** Full tool schemas (when full=true) */
764
+ tools?: ToolSchema[];
765
+ /** Slim tool summaries (when full=false/omitted) */
766
+ toolSummaries?: ToolSchemaSummary[];
753
767
  /** Agent description */
754
768
  description?: string;
755
769
  /** Security scheme (if any) */
756
770
  security?: SecuritySchemeSummary;
757
771
  /** Available resources (e.g., AUTH.md) */
758
772
  resources?: Array<{ uri: string; name?: string; mimeType?: string }>;
773
+ /** Human-readable hint about full mode */
774
+ context?: string;
759
775
  }
760
776
 
761
777
  /** A resolved agent ref with its discovered tools */