Skip to main content
Glama

generate_vscode_tasks

Create VSCode tasks.json files to automate build and test commands for your development projects.

Instructions

Generates a .vscode/tasks.json file for VSCode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNameYes
languageYes
buildCommandNo
testCommandNo

Implementation Reference

  • The core handler function that implements the generate_vscode_tasks tool logic, generating a VSCode tasks.json file based on project name, language, and optional commands.
    export function generateVSCodeTasksHandler(args: any) {
        const { projectName, language, buildCommand, testCommand } = args;
    
        const defaultBuild = language === "typescript" ? "npm run build" :
            language === "python" ? "python -m pytest" :
                language === "rust" ? "cargo build" : "npm run build";
        const defaultTest = language === "typescript" ? "npm test" :
            language === "python" ? "python -m pytest" :
                language === "rust" ? "cargo test" : "npm test";
    
        const content = JSON.stringify({
            "version": "2.0.0",
            "tasks": [
                {
                    "label": "Build",
                    "type": "shell",
                    "command": buildCommand || defaultBuild,
                    "group": { "kind": "build", "isDefault": true },
                    "problemMatcher": ["$tsc"]
                },
                {
                    "label": "Test",
                    "type": "shell",
                    "command": testCommand || defaultTest,
                    "group": { "kind": "test", "isDefault": true }
                }
            ]
        }, null, 2);
        return { content: [{ type: "text", text: content }] };
    }
  • The input schema definition using Zod for validating arguments to the generate_vscode_tasks tool.
    export const generateVSCodeTasksSchema = {
        name: "generate_vscode_tasks",
        description: "Generates a .vscode/tasks.json file for VSCode.",
        inputSchema: z.object({
            projectName: z.string(),
            language: z.string(),
            buildCommand: z.string().optional(),
            testCommand: z.string().optional()
        })
    };
  • src/server.ts:115-115 (registration)
    Registration of the generate_vscode_tasks tool in the HTTP server's tool registry map.
    ["generate_vscode_tasks", { schema: generateVSCodeTasksSchema, handler: generateVSCodeTasksHandler }],
  • src/index.ts:109-109 (registration)
    Registration of the generate_vscode_tasks tool in the main MCP server's tool registry map.
    ["generate_vscode_tasks", { schema: generateVSCodeTasksSchema, handler: generateVSCodeTasksHandler }],
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool generates a file, implying a write operation, but doesn't disclose where the file is created (e.g., current directory), whether it overwrites existing files, requires specific permissions, or provides any error handling. This is inadequate for a tool that modifies the filesystem.

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 sentence that front-loads the core action. There's no wasted verbiage, making it easy to parse quickly.

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?

Given no annotations, 0% schema coverage, no output schema, and 4 parameters, the description is incomplete. It doesn't explain what the generated file contains, how parameters influence it, or behavioral aspects like file location or overwrite behavior, which are critical for a file-generation tool.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate by explaining parameters, but it provides no parameter information. The four parameters (projectName, language, buildCommand, testCommand) are undocumented in both schema and description, leaving their purpose and format unclear.

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

Purpose4/5

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

The description clearly states the verb ('Generates') and resource ('.vscode/tasks.json file for VSCode'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'generate_vscode_launch' or other VSCode config generators, which would require a 5.

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. It doesn't mention prerequisites, context (e.g., project setup), or compare to sibling tools like 'generate_vscode_launch' or other config generators, leaving the agent with no usage context.

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/millsydotdev/Code-MCP'

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