Skip to main content
Glama

check_compliance

Verify code files against security standards like OWASP and CWE to ensure compliance with established security requirements.

Instructions

Check code compliance with security standards (simplified)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesFile paths to check
standardNoCompliance standardgeneral

Implementation Reference

  • The core handler logic for the 'check_compliance' tool. It processes input files, scans them for security issues using SecurityAnalyzer, and returns a formatted compliance report indicating compliance status and issue details.
    case 'check_compliance': { const files = params.files as string[]; const standard = (params.standard as string) || 'general'; const codeFiles = await FileReader.readFiles(files.join(',')); const issues = await securityAnalyzer.scanSecurityIssues(codeFiles); return { standard, compliant: issues.length === 0, totalIssues: issues.length, issues: issues.map((issue) => ({ type: issue.type, severity: issue.severity, location: issue.location, description: issue.description, recommendation: issue.recommendation, })), }; }
  • Tool definition including name, description, and input schema specification for validating tool arguments (files array required, optional standard).
    { name: 'check_compliance', description: 'Check code compliance with security standards (simplified)', inputSchema: { type: 'object', properties: { files: { type: 'array', items: { type: 'string' }, description: 'File paths to check', }, standard: { type: 'string', enum: ['owasp', 'cwe', 'general'], description: 'Compliance standard', default: 'general', }, }, required: ['files'], }, },
  • src/server.ts:18-25 (registration)
    Registers the check_compliance tool (via inclusion in codeAnalysisTools) in the complete list of tools returned by the MCP ListTools handler.
    const allTools = [ ...codeAnalysisTools, ...codeQualityTools, ...dependencyAnalysisTools, ...lintingTools, ...webScrapingTools, ...apiDiscoveryTools, ];
  • src/server.ts:62-64 (registration)
    Routes tool calls for check_compliance (detected via codeAnalysisTools membership) to the specific handleCodeAnalysisTool dispatcher.
    if (codeAnalysisTools.some((t) => t.name === name)) { result = await handleCodeAnalysisTool(name, args || {}); } else if (codeQualityTools.some((t) => t.name === name)) {

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