Skip to main content
Glama

validate_code_structure

Ensure new code structures align with project architectural guidelines, catching violations early and keeping multi-agent development consistent.

Instructions

Validate that your code structure follows the project's architectural guidelines.

This tool provides flexible project lookup. You can specify any combination of identifiers, and it will resolve to the matching project.

Priority: project_id > workspace_path > project_name

WHEN TO USE:

  • Before finalizing a new file or component structure

  • When creating significant new modules or services

  • To ensure consistency with existing codebase patterns

  • When you're unsure if your approach follows project conventions

  • Before committing major structural changes

USEFUL FOR: Catching architectural violations early and maintaining codebase consistency.

VALIDATION CHECKS:

  • Directory structure conventions

  • Naming conventions

  • Import/export patterns

  • Dependency management

  • Architectural pattern compliance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath where code will be located (required) - e.g., "src/services/auth.ts"
project_idNoProject ID from create_project() (optional if project_name or workspace_path provided)
strict_modeNoEnforce strict validation (optional) - Set to True for critical architectural components
project_nameNoProject name to look up (alternative to project_id)
code_structureYesDescription of proposed structure (required) - Object with component details
workspace_pathNoWorkspace directory path (alternative to project_id)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden for behavioral disclosure. It does disclose the priority order for project lookup (project_id > workspace_path > project_name) and enumerates validation checks, which adds useful context. However, it does not state whether the tool performs side effects, what happens on validation failure, or how strict_mode changes behavior beyond the schema, leaving gaps in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear section headers (WHEN TO USE, VALIDATION CHECKS) and front-loads the core purpose. It is somewhat verbose with overlapping points between 'USEFUL FOR' and earlier statements, but overall each section earns its place and is not excessively padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers usage scenarios and validation checks, which is beneficial given the tool's complexity (6 params, nested objects). However, with no output schema, it does not explain the return format or how results are presented (e.g., list of violations, success/failure), nor does it discuss error handling. This leaves the description incomplete for an agent to fully anticipate the tool's response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% coverage, so the baseline is 3. The description adds meaning beyond the schema by explaining the flexible lookup behavior ('You can specify any combination of identifiers') and the priority order among project_id, workspace_path, and project_name. This enriches understanding of how parameters interact, going beyond the individual property descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description starts with a specific verb 'Validate' and resource 'code structure' followed by the goal 'follows the project's architectural guidelines.' It clearly distinguishes this from sibling tools like validate_workflow_state_tool by focusing on code structure rather than workflow state, and from analyze_architecture by emphasizing validation against guidelines rather than analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'WHEN TO USE' section lists concrete scenarios like 'Before finalizing a new file' and 'Before committing major structural changes,' giving clear context for use. However, it does not explicitly mention when not to use or recommend alternative siblings, so it misses exclusions but provides solid usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/siddiquesahabaj/CoordMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server