Skip to main content
Glama
ai-naming-standard

AI Naming Standard MCP Server

Official

checkFolderPermission

Verify AI access permissions for specific folders in microservices architecture to ensure compliance with naming standards and security protocols.

Instructions

Check AI permission for a specific folder (v6 includes 07_META)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderYesFolder name to check
operationNoOperation typemodify
aiNameNoAI name (cursor, claude, chatgpt, windsurf, human)cursor

Implementation Reference

  • The core handler function implementing the checkFolderPermission tool logic, using namingRules and hardcoded permissions to determine if an operation is allowed on a folder.
    export async function checkFolderPermission({ folder, operation = 'modify' }) {
      const msg = getMessages();
      const rules = namingRules();
      
      const folderInfo = rules.standardFolders[folder];
      
      if (!folderInfo) {
        return {
          valid: false,
          error: `Unknown folder: ${folder}`,
          suggestion: 'Use one of: 00_DOCS, 01_CONFIG, 02_STATIC, 03_ACTIVE, 04_TEST, 05_BUILD, 06_LOGS'
        };
      }
      
      const permissions = {
        '00_DOCS': { read: true, write: false, modify: false, delete: false },
        '01_CONFIG': { read: true, write: false, modify: false, delete: false },
        '02_STATIC': { read: true, write: true, modify: false, delete: false },
        '03_ACTIVE': { read: true, write: true, modify: true, delete: true },
        '04_TEST': { read: true, write: true, modify: true, delete: false },
        '05_BUILD': { read: true, write: true, modify: false, delete: true },
        '06_LOGS': { read: true, write: true, modify: false, delete: false }
      };
      
      const permission = permissions[folder][operation];
      
      return {
        folder,
        operation,
        allowed: permission,
        aiPermission: folderInfo.aiPermission,
        description: folderInfo.description,
        message: permission 
          ? `AI can ${operation} in ${folder}`
          : `AI cannot ${operation} in ${folder} (${folderInfo.aiPermission})`
      };
    }
  • The input schema and metadata for the checkFolderPermission tool, defining parameters folder, operation, and aiName with enums and defaults.
      name: 'checkFolderPermission',
      description: 'Check AI permission for a specific folder (v6 includes 07_META)',
      inputSchema: {
        type: 'object',
        properties: {
          folder: {
            type: 'string',
            description: 'Folder name to check',
            enum: ['00_DOCS', '01_CONFIG', '02_STATIC', '03_ACTIVE', '04_TEST', '05_BUILD', '06_LOGS', '07_META']
          },
          operation: {
            type: 'string',
            description: 'Operation type',
            enum: ['read', 'write', 'modify', 'delete'],
            default: 'modify'
          },
          aiName: {
            type: 'string',
            description: 'AI name (cursor, claude, chatgpt, windsurf, human)',
            enum: ['cursor', 'claude', 'chatgpt', 'windsurf', 'human'],
            default: 'cursor'
          }
        },
        required: ['folder']
      }
    },
  • src/index.js:627-628 (registration)
    Registration in the main tool dispatcher switch statement that routes calls to the checkFolderPermission handler.
    case 'checkFolderPermission':
      result = await checkFolderPermission(args);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'check permission' but doesn't specify what the tool returns (e.g., boolean, access level, error if denied), whether it's a read-only operation, or any side effects. The version note adds minor context about folder inclusion but doesn't address key behavioral traits like response format or error handling.

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

Conciseness3/5

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

The description is brief (one sentence) but includes an unnecessary parenthetical note ('v6 includes 07_META') that doesn't add core value. It's front-loaded with the main action, but the extra detail is distracting rather than helpful. It could be more concise by removing the version reference.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete for a permission-checking tool. It doesn't explain what the output will be (e.g., success/failure, access details), behavioral aspects like error cases, or how it integrates with the system. The version note doesn't compensate for these gaps, leaving the agent with insufficient context.

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

Parameters3/5

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

The input schema has 100% description coverage with clear enums and defaults, so the schema does the heavy lifting. The description adds no parameter semantics beyond implying 'folder' is required (via the version note referencing '07_META'), but this is redundant with the schema's required field. No additional meaning is provided for parameters like 'operation' or 'aiName'.

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

Purpose3/5

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

The description states the action ('check AI permission') and resource ('specific folder'), which provides a basic understanding of the tool's function. However, it's somewhat vague about what 'check permission' entails (e.g., returns boolean, detailed access info) and includes an unnecessary version note ('v6 includes 07_META') that doesn't clarify the purpose. It doesn't distinguish from siblings like 'getAIRole' or 'createAIRoleMatrix' which might relate to permissions.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing folder names from another source), exclusions, or compare to sibling tools like 'getAIRole' that might handle permissions differently. The version note hints at scope but doesn't offer actionable usage advice.

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/ai-naming-standard/mcp'

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