@zuplo/runtime 6.59.11 → 6.59.13
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/out/esm/index.js +33 -33
- package/out/types/index.d.ts +0 -120
- package/package.json +1 -1
package/out/types/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { CallToolResult } from "@zuplo/mcp/types";
|
|
2
1
|
import { KeyLike } from "jose";
|
|
3
2
|
import { RequestGeneric as RequestGeneric_2 } from "../../request.js";
|
|
4
3
|
import type { ValidateFunction } from "ajv";
|
|
5
|
-
import { z } from "zod/v4";
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* Authenticates an AI Gateway Application requests based on Application API Keys
|
|
@@ -4902,65 +4900,6 @@ declare type LokiTransportVersion = 1 | 2;
|
|
|
4902
4900
|
|
|
4903
4901
|
/* Excluded from this release type: LookupResult */
|
|
4904
4902
|
|
|
4905
|
-
/**
|
|
4906
|
-
* SDK for creating and managing MCP custom tools
|
|
4907
|
-
*
|
|
4908
|
-
* Provides a fluent API for defining custom MCP tools that can perform
|
|
4909
|
-
* complex operations including calling multiple routes or implementing
|
|
4910
|
-
* custom logic beyond simple route mapping.
|
|
4911
|
-
* @beta
|
|
4912
|
-
*/
|
|
4913
|
-
export declare class McpCustomToolsSDK {
|
|
4914
|
-
/**
|
|
4915
|
-
* Create a new tool builder
|
|
4916
|
-
* @beta
|
|
4917
|
-
*/
|
|
4918
|
-
createTool(): McpToolBuilder;
|
|
4919
|
-
/**
|
|
4920
|
-
* Define a tool with a configuration object
|
|
4921
|
-
* @beta
|
|
4922
|
-
*/
|
|
4923
|
-
defineTool<TSchema extends z.ZodType>(config: {
|
|
4924
|
-
name: string;
|
|
4925
|
-
description: string;
|
|
4926
|
-
schema?: TSchema;
|
|
4927
|
-
outputSchema?: TSchema;
|
|
4928
|
-
handler: McpToolHandler<z.infer<TSchema>>;
|
|
4929
|
-
}): McpToolDefinition<z.infer<TSchema>>;
|
|
4930
|
-
/**
|
|
4931
|
-
* Create a text response
|
|
4932
|
-
* @beta
|
|
4933
|
-
*/
|
|
4934
|
-
textResponse(text: string): CallToolResult;
|
|
4935
|
-
/**
|
|
4936
|
-
* Create a JSON response (automatically stringified and put in structured content)
|
|
4937
|
-
* @beta
|
|
4938
|
-
*/
|
|
4939
|
-
jsonResponse(data: any): CallToolResult;
|
|
4940
|
-
/**
|
|
4941
|
-
* Create an error response
|
|
4942
|
-
* @beta
|
|
4943
|
-
*/
|
|
4944
|
-
errorResponse(message: string): CallToolResult;
|
|
4945
|
-
/**
|
|
4946
|
-
* Create an image response
|
|
4947
|
-
* @beta
|
|
4948
|
-
*/
|
|
4949
|
-
imageResponse(data: string, mimeType: string): CallToolResult;
|
|
4950
|
-
/**
|
|
4951
|
-
* Create a resource response
|
|
4952
|
-
* @beta
|
|
4953
|
-
*/
|
|
4954
|
-
resourceResponse(uri: string, mimeType?: string): CallToolResult;
|
|
4955
|
-
/**
|
|
4956
|
-
* Fetches the original headers used to invoke the MCP server.
|
|
4957
|
-
* This is especially useful for when re-invoking Gateway routes and passing through
|
|
4958
|
-
* all captured headers.
|
|
4959
|
-
* @beta
|
|
4960
|
-
*/
|
|
4961
|
-
getInvokeHeaders(): Record<string, string>;
|
|
4962
|
-
}
|
|
4963
|
-
|
|
4964
4903
|
/**
|
|
4965
4904
|
* An MCP Server handler for Zuplo
|
|
4966
4905
|
* Only POST requests are supported for the HTTP streamable MCP transport.
|
|
@@ -4975,65 +4914,6 @@ export declare function mcpServerHandler(
|
|
|
4975
4914
|
context: ZuploContext
|
|
4976
4915
|
): Promise<Response>;
|
|
4977
4916
|
|
|
4978
|
-
/**
|
|
4979
|
-
* Builder for creating MCP tools with type safety
|
|
4980
|
-
* @beta
|
|
4981
|
-
*/
|
|
4982
|
-
export declare class McpToolBuilder<TSchema extends z.ZodSchema = z.ZodAny> {
|
|
4983
|
-
private config;
|
|
4984
|
-
/**
|
|
4985
|
-
* Set the tool name
|
|
4986
|
-
* @beta
|
|
4987
|
-
*/
|
|
4988
|
-
name(name: string): this;
|
|
4989
|
-
/**
|
|
4990
|
-
* Set the tool description
|
|
4991
|
-
* @beta
|
|
4992
|
-
*/
|
|
4993
|
-
description(description: string): this;
|
|
4994
|
-
/**
|
|
4995
|
-
* Set the input schema for the tool
|
|
4996
|
-
* @beta
|
|
4997
|
-
*/
|
|
4998
|
-
schema<S extends z.ZodSchema>(schema: S): McpToolBuilder<S>;
|
|
4999
|
-
/**
|
|
5000
|
-
* Set the output schema for the tool
|
|
5001
|
-
* @beta
|
|
5002
|
-
*/
|
|
5003
|
-
outSchema<S extends z.ZodSchema>(schema: S): McpToolBuilder<S>;
|
|
5004
|
-
/**
|
|
5005
|
-
* Set the handler function for the tool
|
|
5006
|
-
* @beta
|
|
5007
|
-
*/
|
|
5008
|
-
handler(handler: McpToolHandler<z.infer<TSchema>>): this;
|
|
5009
|
-
/**
|
|
5010
|
-
* Build the tool definition
|
|
5011
|
-
* @beta
|
|
5012
|
-
*/
|
|
5013
|
-
build(): McpToolDefinition<z.infer<TSchema>>;
|
|
5014
|
-
}
|
|
5015
|
-
|
|
5016
|
-
/**
|
|
5017
|
-
* Definition of a custom MCP tool
|
|
5018
|
-
* @beta
|
|
5019
|
-
*/
|
|
5020
|
-
export declare interface McpToolDefinition<TSchema = any> {
|
|
5021
|
-
name: string;
|
|
5022
|
-
description: string;
|
|
5023
|
-
schema?: z.ZodType<TSchema>;
|
|
5024
|
-
outputSchema?: z.ZodType<TSchema>;
|
|
5025
|
-
handler: McpToolHandler<TSchema>;
|
|
5026
|
-
}
|
|
5027
|
-
|
|
5028
|
-
/**
|
|
5029
|
-
* Handler function for MCP tools
|
|
5030
|
-
* @beta
|
|
5031
|
-
*/
|
|
5032
|
-
export declare type McpToolHandler<TArgs = any> = (
|
|
5033
|
-
args: TArgs,
|
|
5034
|
-
context: ZuploContext
|
|
5035
|
-
) => Promise<CallToolResult> | CallToolResult;
|
|
5036
|
-
|
|
5037
4917
|
declare interface MemoryCacheOptions {
|
|
5038
4918
|
maxSize: number;
|
|
5039
4919
|
}
|