Skip to main content
Glama
code-alchemist01

Development Tools MCP Server

analyze_permissions

Analyze file permissions and access control issues to identify security vulnerabilities and configuration problems in development workflows.

Instructions

Analyze file permissions and access control issues

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesFile paths to analyze

Implementation Reference

  • The main handler logic for the 'analyze_permissions' tool. Reads specified files, scans for security issues, filters those with type 'permission', and returns count and details.
    case 'analyze_permissions': {
      const files = params.files as string[];
      const codeFiles = await FileReader.readFiles(files.join(','));
      const issues = await securityAnalyzer.scanSecurityIssues(codeFiles);
      const permissionIssues = issues.filter((i) => i.type === 'permission');
      return {
        total: permissionIssues.length,
        issues: permissionIssues,
      };
    }
  • Tool schema definition specifying name, description, and input schema requiring an array of file paths.
    {
      name: 'analyze_permissions',
      description: 'Analyze file permissions and access control issues',
      inputSchema: {
        type: 'object',
        properties: {
          files: {
            type: 'array',
            items: { type: 'string' },
            description: 'File paths to analyze',
          },
        },
        required: ['files'],
      },
    },
  • src/server.ts:18-25 (registration)
    Registers the 'analyze_permissions' tool by including codeAnalysisTools in the complete list of available tools returned by ListToolsRequestSchema.
    const allTools = [
      ...codeAnalysisTools,
      ...codeQualityTools,
      ...dependencyAnalysisTools,
      ...lintingTools,
      ...webScrapingTools,
      ...apiDiscoveryTools,
    ];
  • src/server.ts:62-63 (registration)
    Routes execution of 'analyze_permissions' tool calls to the handleCodeAnalysisTool function.
    if (codeAnalysisTools.some((t) => t.name === name)) {
      result = await handleCodeAnalysisTool(name, args || {});
  • Core logic that identifies permission issues by detecting file system operations without accompanying permission checks.
    private detectPermissionIssues(file: CodeFile): SecurityIssue[] {
      const issues: SecurityIssue[] = [];
      const content = file.content.toLowerCase();
    
      // File system operations without permission checks
      if (content.includes('fs.writefile') || content.includes('fs.unlink')) {
        if (!content.includes('permission') && !content.includes('access')) {
          issues.push({
            type: 'permission',
            severity: 'medium',
            location: file.path,
            description: 'File system operations without permission checks',
            recommendation: 'Add permission checks before file operations',
            detectedAt: new Date(),
          });
        }
      }
    
      return issues;
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'analyze' suggests a read-only operation, the description doesn't clarify whether this tool requires specific permissions, what kind of output it produces, whether it makes network calls, or any rate limits. For a security/permissions analysis tool with zero annotation coverage, this is inadequate.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a tool with one parameter and gets straight to the point without unnecessary elaboration.

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?

For a security/permissions analysis tool with no annotations and no output schema, the description is insufficient. It doesn't explain what kind of analysis is performed, what format the results take, whether it's a local or remote analysis, or what security context is required. The description leaves too many open questions for effective tool selection and use.

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?

Schema description coverage is 100% with the 'files' parameter clearly documented in the schema. The description doesn't add any parameter-specific information beyond what's already in the schema. With good schema coverage, the baseline score of 3 is appropriate - the description doesn't enhance parameter understanding but doesn't need to compensate for schema gaps either.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Analyze file permissions and access control issues' - a specific verb ('analyze') and resource ('file permissions and access control issues'). However, it doesn't explicitly differentiate from sibling tools like 'scan_security_issues' or 'check_compliance' that might have overlapping security analysis domains.

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. With many sibling tools focused on analysis (e.g., analyze_code_quality, analyze_dependencies, scan_security_issues), there's no indication of what makes this tool distinct or when it should be preferred over other analysis tools.

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/code-alchemist01/development-tools-mcp-Server'

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