Skip to main content
Glama

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

NameRequiredDescriptionDefault
projectNameYes
languagesYes

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

  • 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 }] }; }
  • 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";

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