Skip to main content
Glama
tools.md13.7 kB
# Code-MCP Tools Reference Complete documentation for all 46 tools. --- ## Cognitive Tools (10) ### `sequential_thinking` Step-by-step structured reasoning for complex problems. **Parameters:** - `thought` (string, required) - Current step/thought - `step` (number, required) - Current step number - `total_steps` (number, required) - Estimated total steps - `next_action` (string, required) - CONTINUE, REVISE, or final answer - `is_revision` (boolean, optional) - If revising previous step --- ### `plan_task` Creates a structured plan for coding tasks. **Parameters:** - `task` (string, required) - Task description - `context` (string, optional) - Project context, tech stack - `scope` (enum, optional) - "small" | "medium" | "large" --- ### `reflect_on_code` Analyzes code quality, security, performance, maintainability. **Parameters:** - `code` (string, required) - Code to analyze - `language` (string, required) - Programming language - `focus` (array, optional) - ["quality", "security", "performance", "maintainability", "all"] --- ### `analyze_architecture` System design and architecture analysis. **Parameters:** - `description` (string, required) - Architecture description - `components` (array, optional) - List of main components - `concerns` (array, optional) - Specific concerns to address --- ### `debug_problem` Systematic debugging approach. **Parameters:** - `problem` (string, required) - Problem description - `symptoms` (array, optional) - Observed symptoms - `context` (string, optional) - Environment, recent changes --- ### `brainstorm_solutions` Generate multiple solution approaches. **Parameters:** - `problem` (string, required) - Problem to solve - `constraints` (array, optional) - Requirements/constraints - `preferences` (array, optional) - Preferred approaches --- ### `compare_approaches` Compare technical approaches. **Parameters:** - `approaches` (array, required) - List of approaches - `criteria` (array, optional) - Evaluation criteria --- ### `estimate_complexity` Estimate task complexity and effort. **Parameters:** - `task` (string, required) - Task to estimate - `factors` (array, optional) - Complexity factors --- ### `generate_tests` Generate test case suggestions. **Parameters:** - `feature` (string, required) - Feature to test - `type` (enum, optional) - "unit" | "integration" | "e2e" | "all" --- ### `explain_code` Explain code at beginner/intermediate/expert level. **Parameters:** - `code` (string, required) - Code to explain - `language` (string, required) - Programming language - `level` (enum, optional) - "beginner" | "intermediate" | "expert" --- ## Memory Tools (4) ### `save_memory` Persist key-value data across sessions. **Parameters:** - `key` (string, required) - Unique key - `value` (string, required) - Value to store - `project` (string, optional) - Project scope --- ### `read_memory` Retrieve saved data. **Parameters:** - `key` (string, required) - Key to retrieve --- ### `list_memories` List all saved memories. **Parameters:** - `project` (string, optional) - Filter by project --- ### `clear_memory` Clear memories. **Parameters:** - `key` (string, optional) - Specific key to clear - `project` (string, optional) - Clear all for project - `clearAll` (boolean, optional) - Clear everything --- ## Code Generators (6) ### `generate_snippet` Generate production-ready code for common patterns. **Parameters:** - `pattern` (enum, required) - Pattern type: - `api-endpoint` - Full CRUD endpoints - `react-component` - React component with hooks - `react-hook` - Custom hook - `express-middleware` - Express middleware - `zod-schema` - Zod validation schema - `test-suite` - Vitest test file - `prisma-model` - Prisma model + service - `docker-compose` - Docker Compose config - `github-action` - CI/CD workflow - `error-handler` - Custom error classes - `logger` - Structured logger - `auth-middleware` - JWT authentication - `name` (string, required) - Name for the code - `options` (object, optional) - Additional options --- ### `regex_builder` Build regex patterns with explanations. **Parameters:** - `pattern` (enum, required) - Pattern type: - `email`, `url`, `phone`, `uuid`, `slug`, `password` - `options` (object, optional) - strict, global, caseInsensitive --- ### `typescript_helper` Generate TypeScript types and patterns. **Parameters:** - `pattern` (enum, required) - Pattern type: - `interface` - Interface definition - `type` - Type alias - `enum` - Enum with alternatives - `generic` - Generic functions/classes - `utility-types` - Pick, Omit, Partial, etc. - `discriminated-union` - Type-safe unions - `mapped-type` - Key transformations - `conditional-type` - Advanced conditionals - `api-response` - API wrapper types - `form-data` - Form state types - `state-machine` - FSM types - `name` (string, required) - Type name - `fields` (array, optional) - Field definitions --- ### `generate_api_client` Generate type-safe API clients. **Parameters:** - `baseUrl` (string, required) - API base URL - `endpoints` (array, required) - Endpoint definitions - `name` (string) - Method name - `method` (enum) - GET, POST, PUT, PATCH, DELETE - `path` (string) - Endpoint path - `library` (enum, optional) - "fetch" | "axios" --- ### `sql_helper` Generate SQL queries and operations. **Parameters:** - `operation` (enum, required) - Operation type: - `create-table` - Table creation with triggers - `alter-table` - Schema modifications - `index` - Index creation - `migration` - Up/down migrations - `select` - SELECT queries - `insert` - INSERT with upsert - `update` - UPDATE queries - `delete` - DELETE queries - `join` - JOIN operations - `aggregate` - COUNT, SUM, AVG, etc. - `cte` - Common Table Expressions - `window-function` - Window functions - `table` (string, required) - Table name - `columns` (array, optional) - Column definitions - `database` (enum, optional) - "postgres" | "mysql" | "sqlite" --- ### `validate_code` Validate code syntax. **Parameters:** - `code` (string, required) - Code to validate - `language` (string, required) - Programming language --- ## Validation Tools (3) ### `check_imports` Check import statements for issues. **Parameters:** - `code` (string, required) - Code with imports - `language` (string, required) - Programming language --- ### `lint_code` Analyze code for style and bugs. **Parameters:** - `code` (string, required) - Code to lint - `language` (string, required) - Programming language - `rules` (array, optional) - Specific rules --- ### `format_code` Format code following style guides. **Parameters:** - `code` (string, required) - Code to format - `language` (string, required) - Programming language - `indent` (number, optional) - Indentation size --- ## File Generators (6) ### `generate_package_json` Generate complete package.json. **Parameters:** - `name` (string, required) - Project name - `type` (enum, required) - "node-api" | "react" | "next" | "express" | "cli" | "library" - `typescript` (boolean, optional) - Include TypeScript (default: true) - `features` (array, optional) - ["testing", "linting", "prettier"] --- ### `generate_dockerfile` Generate optimized Dockerfiles. **Parameters:** - `type` (enum, required) - "node" | "python" | "go" | "rust" | "static" - `port` (number, optional) - Port to expose (default: 3000) - `multiStage` (boolean, optional) - Multi-stage build (default: true) --- ### `generate_env_template` Generate .env.example files. **Parameters:** - `type` (enum, required) - "api" | "fullstack" | "database" | "auth" | "all" - `database` (enum, optional) - "postgres" | "mysql" | "mongodb" | "redis" | "none" --- ### `generate_readme` Generate complete README.md. **Parameters:** - `projectName` (string, required) - Project name - `description` (string, required) - Short description - `type` (enum, required) - "library" | "cli" | "api" | "webapp" | "fullstack" - `language` (string, required) - Primary language - `features` (array, optional) - Key features --- ### `generate_license` Generate license files. **Parameters:** - `license` (enum, required) - "MIT" | "Apache-2.0" | "GPL-3.0" | "BSD-3-Clause" | "ISC" | "Unlicense" - `author` (string, required) - Author name - `year` (number, optional) - Year (default: current year) --- ### `git_helper` Git commands for common scenarios. **Parameters:** - `scenario` (enum, required) - Scenario: - `undo-commit` - Undo last commit - `squash-commits` - Squash multiple commits - `rebase-branch` - Rebase onto another branch - `cherry-pick` - Cherry-pick commits - `stash-work` - Stash operations - `create-branch` - Create and push branch - `merge-conflict` - Resolve conflicts - `reset-file` - Discard file changes - `amend-commit` - Amend last commit - `bisect-bug` - Binary search for bugs - `clean-branches` - Delete merged branches - `tag-release` - Create and push tags - `details` (string, optional) - Additional context --- ## AI Config Generators (7) ### `generate_cursor_rules` Generate .cursorrules file. **Parameters:** - `projectName` (string, required) - Project name - `languages` (array, required) - Languages used - `frameworks` (array, optional) - Frameworks used - `databases` (array, optional) - Databases used --- ### `generate_claude_config` Generate CLAUDE.md file. **Parameters:** - `projectName` (string, required) - Project name - `languages` (array, required) - Languages used - `description` (string, optional) - Project description --- ### `generate_gemini_config` Generate GEMINI.md file. **Parameters:** - `projectName` (string, required) - Project name - `languages` (array, required) - Languages used - `description` (string, optional) - Project description --- ### `generate_copilot_config` Generate GitHub Copilot instructions. **Parameters:** - `projectName` (string, required) - Project name - `languages` (array, required) - Languages used - `frameworks` (array, optional) - Frameworks used --- ### `generate_windsurf_config` Generate .windsurfrules file. **Parameters:** - `projectName` (string, required) - Project name - `languages` (array, required) - Languages used - `description` (string, optional) - Description --- ### `generate_aider_config` Generate .aider.conf.yml file. **Parameters:** - `projectName` (string, required) - Project name - `languages` (array, required) - Languages used - `model` (string, optional) - AI model to use --- ### `generate_cline_config` Generate .clinerules file. **Parameters:** - `projectName` (string, required) - Project name - `languages` (array, required) - Languages used --- ## IDE Config Generators (5) ### `generate_continue_config` Generate Continue.dev config. **Parameters:** - `projectName` (string, required) - Project name - `languages` (array, required) - Languages used - `model` (string, optional) - AI model --- ### `generate_tabnine_config` Generate .tabnine.json config. **Parameters:** - `projectName` (string, required) - Project name - `languages` (array, required) - Languages used --- ### `generate_vscode_tasks` Generate .vscode/tasks.json. **Parameters:** - `projectName` (string, required) - Project name - `language` (string, required) - Language - `buildCommand` (string, optional) - Build command - `testCommand` (string, optional) - Test command --- ### `generate_vscode_launch` Generate .vscode/launch.json. **Parameters:** - `projectName` (string, required) - Project name - `language` (string, required) - Language - `entryPoint` (string, optional) - Entry point file --- ### `generate_jetbrains_config` Generate JetBrains run configuration. **Parameters:** - `projectName` (string, required) - Project name - `language` (string, required) - Language - `entryPoint` (string, optional) - Entry point --- ## Full-Stack Tools (5) ### `track_project` Analyze project structure. **Parameters:** - `projectPath` (string, required) - Root path - `projectName` (string, required) - Project name - `techStack` (array, optional) - Technologies used --- ### `check_dependencies` Check dependency health and security. **Parameters:** - `packageManager` (enum, required) - "npm" | "yarn" | "pnpm" | "pip" | "cargo" - `packageFile` (string, optional) - Package file path --- ### `generate_github_actions` Generate CI/CD workflows. **Parameters:** - `projectType` (enum, required) - "node" | "python" | "rust" | "go" | "docker" - `features` (array, required) - ["test", "lint", "build", "deploy", "security", "release"] --- ### `full_stack_scaffold` Generate complete project structure. **Parameters:** - `projectName` (string, required) - Project name - `frontend` (enum, required) - "react" | "vue" | "svelte" | "next" | "none" - `backend` (enum, required) - "express" | "fastapi" | "django" | "nestjs" | "none" - `database` (enum, required) - "postgresql" | "mongodb" | "sqlite" | "none" - `features` (array, optional) - Additional features --- ### `developer_rules` Best practices checklist. **Parameters:** - `category` (enum, required) - "security" | "performance" | "maintainability" | "all" --- ## Usage Examples ``` // Generate a React component generate_snippet(pattern: "react-component", name: "UserCard") // Get git help for squashing git_helper(scenario: "squash-commits", details: "3") // Generate TypeScript discriminated union typescript_helper(pattern: "discriminated-union", name: "ApiResult") // Create SQL migration sql_helper(operation: "create-table", table: "users") // Generate package.json for Express API generate_package_json(name: "my-api", type: "express", features: ["testing", "linting"]) ```

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