(tool: {
id: string
title: string
schema: unknown
code: string
})
| 646 | * Serialize a custom tool for VFS custom-tools/{name}.json |
| 647 | */ |
| 648 | export function serializeCustomTool(tool: { |
| 649 | id: string |
| 650 | title: string |
| 651 | schema: unknown |
| 652 | code: string |
| 653 | }): string { |
| 654 | return JSON.stringify( |
| 655 | { |
| 656 | id: tool.id, |
| 657 | title: tool.title, |
| 658 | schema: tool.schema, |
| 659 | codePreview: truncate(tool.code, 500), |
| 660 | }, |
| 661 | null, |
| 662 | 2 |
| 663 | ) |
| 664 | } |
| 665 | |
| 666 | /** |
| 667 | * Serialize an MCP server for VFS agent/mcp-servers/{name}.json |
no test coverage detected