generate_windsurf_config
Create a .windsurfrules configuration file for Windsurf IDE to define project settings, supported languages, and descriptions for AI-assisted development workflows.
Instructions
Generates a .windsurfrules file for Windsurf IDE.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectName | Yes | ||
| languages | Yes | ||
| description | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"description": {
"type": "string"
},
"languages": {
"items": {
"type": "string"
},
"type": "array"
},
"projectName": {
"type": "string"
}
},
"required": [
"projectName",
"languages"
],
"type": "object"
}
Implementation Reference
- src/tools/aiconfigs.ts:157-161 (handler)The handler function that implements the core logic of generating Windsurf IDE configuration file content based on project details.export function generateWindsurfConfigHandler(args: any) { const { projectName, languages, description = "" } = args; const content = `# ${projectName} Windsurf Rules\n\n${description}\n\n## Languages\n${languages.join(", ")}\n\n## Coding Standards\n- Follow official documentation\n- Use consistent formatting\n- Write comprehensive tests\n- Handle errors properly\n`; return { content: [{ type: "text", text: content }] }; }
- src/tools/aiconfigs.ts:147-155 (schema)Zod-based input schema definition for the generate_windsurf_config tool, including parameters for projectName, languages, and optional description.export const generateWindsurfConfigSchema = { name: "generate_windsurf_config", description: "Generates a .windsurfrules file for Windsurf IDE.", inputSchema: z.object({ projectName: z.string(), languages: z.array(z.string()), description: z.string().optional() }) };
- src/index.ts:98-98 (registration)Tool registration in the main stdio server index, mapping the tool name to its schema and handler.["generate_windsurf_config", { schema: generateWindsurfConfigSchema, handler: generateWindsurfConfigHandler }],
- src/server.ts:109-109 (registration)Tool registration in the HTTP server, mapping the tool name to its schema and handler.["generate_windsurf_config", { schema: generateWindsurfConfigSchema, handler: generateWindsurfConfigHandler }],