chore: change import assert to readFile (#368)

This commit is contained in:
Max Schmitt
2025-05-07 11:30:01 +02:00
committed by GitHub
parent 35e6c49d7c
commit 91ae93c167
4 changed files with 8 additions and 6 deletions

View File

@@ -18,14 +18,12 @@ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { CallToolRequestSchema, ListToolsRequestSchema, Tool as McpTool } from '@modelcontextprotocol/sdk/types.js';
import { zodToJsonSchema } from 'zod-to-json-schema';
import { Context } from './context.js';
import { Context, packageJSON } from './context.js';
import { snapshotTools, screenshotTools } from './tools.js';
import type { Config } from '../config.js';
import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
import packageJSON from '../package.json' with { type: 'json' };
export async function createConnection(config: Config): Promise<Connection> {
const allTools = config.vision ? screenshotTools : snapshotTools;
const tools = allTools.filter(tool => !config.capabilities || tool.capability === 'core' || config.capabilities.includes(tool.capability));