// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { Metadata, asTextContentResult } from 'chunkr-ai-mcp/tools/types'; import { Tool } from '@modelcontextprotocol/sdk/types.js'; import Chunkr from 'chunkr-ai'; export const metadata: Metadata = { resource: 'files', operation: 'read', tags: [], httpMethod: 'get', httpPath: '/files/{file_id}/content', operationId: 'get_file_content_route', }; export const tool: Tool = { name: 'content_files', description: "Streams the file bytes directly if authorized. The response will set the\n`Content-Type` header to the file's detected MIME type.", inputSchema: { type: 'object', properties: { file_id: { type: 'string', }, }, required: ['file_id'], }, annotations: { readOnlyHint: true, }, }; export const handler = async (client: Chunkr, args: Record | undefined) => { const { file_id, ...body } = args as any; const response = await client.files.content(file_id).asResponse(); return asTextContentResult(await response.text()); }; export default { metadata, tool, handler };