generate_copilot_config
Generate GitHub Copilot configuration files to customize AI coding assistance for specific projects, languages, and frameworks.
Instructions
Generates a .github/copilot-instructions.md for GitHub Copilot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectName | Yes | ||
| languages | Yes | ||
| frameworks | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"frameworks": {
"items": {
"type": "string"
},
"type": "array"
},
"languages": {
"items": {
"type": "string"
},
"type": "array"
},
"projectName": {
"type": "string"
}
},
"required": [
"projectName",
"languages"
],
"type": "object"
}
Implementation Reference
- src/tools/aiconfigs.ts:207-211 (handler)The handler function that implements the core logic of generating GitHub Copilot configuration file content based on project name, languages, and frameworks.export function generateCopilotConfigHandler(args: any) { const { projectName, languages, frameworks = [] } = args; const content = `# ${projectName} - GitHub Copilot Instructions\n\n## Tech Stack\n- Languages: ${languages.join(", ")}\n${frameworks.length ? `- Frameworks: ${frameworks.join(", ")}` : ""}\n\n## Guidelines\n- Follow ${languages[0]} idioms\n- Write clear, documented code\n- Include type hints where applicable\n- Write comprehensive tests\n`; return { content: [{ type: "text", text: content }] }; }
- src/tools/aiconfigs.ts:197-205 (schema)The Zod schema defining the tool's name, description, and input parameters (projectName, languages, optional frameworks).export const generateCopilotConfigSchema = { name: "generate_copilot_config", description: "Generates a .github/copilot-instructions.md for GitHub Copilot.", inputSchema: z.object({ projectName: z.string(), languages: z.array(z.string()), frameworks: z.array(z.string()).optional() }) };
- src/server.ts:112-112 (registration)Registration of the tool in the HTTP server registry map, linking the schema and handler.["generate_copilot_config", { schema: generateCopilotConfigSchema, handler: generateCopilotConfigHandler }],
- src/index.ts:101-101 (registration)Registration of the tool in the stdio server registry map, linking the schema and handler.["generate_copilot_config", { schema: generateCopilotConfigSchema, handler: generateCopilotConfigHandler }],
- src/index.ts:30-30 (registration)Import statement bringing in the schema and handler from the aiconfigs module for use in registration.generateCopilotConfigSchema, generateCopilotConfigHandler