mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-21 13:25:15 +02:00
Update doc in tools/gzip-file-as-resource.ts
This commit is contained in:
@@ -50,6 +50,21 @@ const config = {
|
|||||||
inputSchema: GZipFileAsResourceSchema,
|
inputSchema: GZipFileAsResourceSchema,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers the `gzip-file-as-resource` tool with the provided MCP server.
|
||||||
|
*
|
||||||
|
* The registered tool compresses input data using gzip, and makes the resulting file accessible
|
||||||
|
* as a resource for the duration of the session.
|
||||||
|
*
|
||||||
|
* The tool supports two output types:
|
||||||
|
* - "resource": Returns the resource directly, including its URI, MIME type, and base64-encoded content.
|
||||||
|
* - "resourceLink": Returns a link to access the resource later.
|
||||||
|
*
|
||||||
|
* If an unrecognized `outputType` is provided, the tool throws an error.
|
||||||
|
*
|
||||||
|
* @param {McpServer} server - The server instance where the tool will be registered.
|
||||||
|
* @throws {Error} Throws an error if an unknown output type is specified.
|
||||||
|
*/
|
||||||
export const registerGZipFileAsResourceTool = (server: McpServer) => {
|
export const registerGZipFileAsResourceTool = (server: McpServer) => {
|
||||||
server.registerTool(name, config, async (args): Promise<CallToolResult> => {
|
server.registerTool(name, config, async (args): Promise<CallToolResult> => {
|
||||||
const {
|
const {
|
||||||
|
|||||||
Reference in New Issue
Block a user