Download packages/kap-server/src/protocol/rest-tool.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 775 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/kap-server/src/protocol/rest-tool.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/kap-server/src/protocol/rest-tool.ts
-
curl -L -o rest-tool.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/kap-server/src/protocol/rest-tool.ts
775 Bytes
| import { z } from 'zod'; | |
| import { mcpServerSchema, toolDescriptorSchema } from './tool'; | |
| export const listToolsQuerySchema = z.object({ | |
| session_id: z.string().min(1).optional(), | |
| }); | |
| export type ListToolsQuery = z.infer<typeof listToolsQuerySchema>; | |
| export const listToolsResponseSchema = z.object({ | |
| tools: z.array(toolDescriptorSchema), | |
| }); | |
| export type ListToolsResponse = z.infer<typeof listToolsResponseSchema>; | |
| export const listMcpServersResponseSchema = z.object({ | |
| servers: z.array(mcpServerSchema), | |
| }); | |
| export type ListMcpServersResponse = z.infer<typeof listMcpServersResponseSchema>; | |
| export const restartMcpServerResultSchema = z.object({ | |
| restarting: z.literal(true), | |
| }); | |
| export type RestartMcpServerResult = z.infer<typeof restartMcpServerResultSchema>; | |