generate_cline_config
Generate a .clinerules configuration file for Cline/Roo Code projects to define project structure and supported programming languages.
Instructions
Generates a .clinerules file for Cline/Roo Code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectName | Yes | ||
| languages | Yes |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"languages": {
"items": {
"type": "string"
},
"type": "array"
},
"projectName": {
"type": "string"
}
},
"required": [
"projectName",
"languages"
],
"type": "object"
}
Implementation Reference
- src/tools/aiconfigs.ts:190-194 (handler)The main handler function that implements the tool logic, generating markdown content for a .clinerules file based on projectName and languages.export function generateClineConfigHandler(args: any) { const { projectName, languages } = args; const content = `# ${projectName} - Cline Rules\n\n## Project Stack\n${languages.join(", ")}\n\n## Instructions\n- Follow ${languages[0]} best practices\n- Write clean, tested code\n- Handle errors appropriately\n`; return { content: [{ type: "text", text: content }] }; }
- src/tools/aiconfigs.ts:181-188 (schema)The Zod schema defining the tool's metadata and input validation schema (projectName: string, languages: array of strings).export const generateClineConfigSchema = { name: "generate_cline_config", description: "Generates a .clinerules file for Cline/Roo Code.", inputSchema: z.object({ projectName: z.string(), languages: z.array(z.string()) }) };
- src/index.ts:100-100 (registration)Registration of the tool in the main toolRegistry Map used by the stdio MCP server.["generate_cline_config", { schema: generateClineConfigSchema, handler: generateClineConfigHandler }],
- src/server.ts:111-111 (registration)Registration of the tool in the toolRegistry Map used by the HTTP MCP server.["generate_cline_config", { schema: generateClineConfigSchema, handler: generateClineConfigHandler }],
- src/index.ts:29-31 (registration)Import statement bringing in the schema and handler from aiconfigs.ts (note: .js extension likely due to build config).generateClineConfigSchema, generateClineConfigHandler, generateCopilotConfigSchema, generateCopilotConfigHandler } from "./tools/aiconfigs.js";