Skip to main content
Glama
bsmi021

Node Omnibus MCP Server

by bsmi021

update_tsconfig

Modify TypeScript compiler settings in a project directory to configure build behavior and development environment.

Instructions

Update TypeScript configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesProject directory path
optionsYesTypeScript compiler options

Implementation Reference

  • The handler function that reads (or creates) tsconfig.json, merges the provided options into compilerOptions, writes it back, and returns a success message. Uses validatePath helper.
    private async handleUpdateTsConfig(args: UpdateTsConfigArgs) {
        await this.validatePath(args.path);
    
        try {
            const tsconfigPath = path.join(args.path, 'tsconfig.json');
            interface TsConfig {
                compilerOptions: Record<string, unknown>;
                include?: string[];
                exclude?: string[];
            }
            let tsconfig: TsConfig = {
                compilerOptions: {}
            };
    
            try {
                tsconfig = JSON.parse(await fs.readFile(tsconfigPath, 'utf-8')) as TsConfig;
            } catch {
                // Create new tsconfig if it doesn't exist
                tsconfig = {
                    compilerOptions: {},
                    include: ["src/**/*"],
                    exclude: ["node_modules", "dist"]
                };
            }
    
            // Deep merge the new options
            tsconfig.compilerOptions = {
                ...tsconfig.compilerOptions,
                ...args.options,
            };
    
            await fs.writeFile(tsconfigPath, JSON.stringify(tsconfig, null, 2));
    
            return {
                content: [
                    {
                        type: 'text',
                        text: `Updated TypeScript configuration at ${tsconfigPath}`,
                    },
                ],
            };
        } catch (error) {
            throw new McpError(
                ErrorCode.InternalError,
                `Failed to update TypeScript configuration: ${error instanceof Error ? error.message : String(error)}`
            );
        }
    }
  • src/index.ts:346-364 (registration)
    The tool registration in ListToolsRequestSchema, defining name, description, and inputSchema for MCP tool listing.
    {
        name: 'update_tsconfig',
        description: 'Update TypeScript configuration',
        inputSchema: {
            type: 'object',
            properties: {
                path: {
                    type: 'string',
                    description: 'Project directory path',
                },
                options: {
                    type: 'object',
                    description: 'TypeScript compiler options',
                    additionalProperties: true,
                },
            },
            required: ['path', 'options'],
        },
    },
  • TypeScript interface defining the arguments for the update_tsconfig handler.
    interface UpdateTsConfigArgs extends Record<string, unknown> {
        path: string;
        options: Record<string, unknown>;
    }
  • src/index.ts:405-406 (registration)
    The switch case in CallToolRequestSchema handler that routes to the specific tool handler.
    case 'update_tsconfig':
        return await this.handleUpdateTsConfig(args as UpdateTsConfigArgs);
  • Local interface used within the handler for typing the tsconfig.json structure.
    interface TsConfig {
        compilerOptions: Record<string, unknown>;
        include?: string[];
        exclude?: string[];
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Update' which implies mutation, but doesn't describe what gets modified (e.g., tsconfig.json file), whether changes are destructive, what permissions are required, or what happens on success/failure. This leaves significant behavioral gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient phrase with zero wasted words. It's appropriately sized for a tool with good schema coverage and gets straight to the point without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what gets updated (e.g., tsconfig.json file), what the update entails, potential side effects, or expected outcomes. The agent lacks crucial context for safe and effective tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear documentation for both parameters ('path' and 'options'). The description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline score of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Update TypeScript configuration' clearly states the action (update) and resource (TypeScript configuration), but it's vague about what specifically gets updated. It doesn't distinguish this tool from potential siblings like 'create_project' or 'create_type_definition' that might also involve TypeScript configuration.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There are no explicit when/when-not instructions or references to sibling tools. The agent must infer usage from the tool name alone, which is insufficient for optimal selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bsmi021/mcp-node-omnibus-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server