Skip to main content
Glama

compliance_report

Generate EU AI Act compliance reports for AI agents, assessing risk levels, transparency declarations, audit summaries, and trust status.

Instructions

Get EU AI Act compliance report for an agent. Returns risk level, transparency declaration, audit summary, and trust status. Free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesAgent ID (e.g., agt_E-PFtTAIQlfVleNm)

Implementation Reference

  • The 'compliance_report' tool is defined and implemented directly within src/mcp-server.js using the server.tool method. It retrieves agent data from the database, calculates reputation, parses transparency declarations, and returns a JSON response with compliance status.
    server.tool(
      'compliance_report',
      'Get EU AI Act compliance report for an agent. Returns risk level, transparency declaration, audit summary, and trust status. Free.',
      {
        agent_id: z.string().describe('Agent ID (e.g., agt_E-PFtTAIQlfVleNm)'),
      },
      async ({ agent_id }) => {
        try {
          const { getDb } = require('./database');
          const { TRANSPARENCY_ALLOWED_KEYS } = require('./constants');
          const db = getDb();
    
          const agent = db.prepare(
            "SELECT id, name, wallet_address, category, status, registered_at, last_heartbeat, human_sponsor, ai_act_risk_level, transparency_declaration, wallet_verified FROM agents WHERE id = ?"
          ).get(agent_id);
    
          if (!agent) {
            return { content: [{ type: 'text', text: JSON.stringify({ success: false, error: 'Agent not found' }, null, 2) }] };
          }
    
          const reputation = computeReputation(agent.id);
    
          const stamp = db.prepare(
            "SELECT tier, expires_at FROM stamps WHERE wallet_address = ? AND revoked = 0 AND expires_at > datetime('now') ORDER BY CASE tier WHEN 'gold' THEN 1 WHEN 'silver' THEN 2 WHEN 'bronze' THEN 3 ELSE 4 END LIMIT 1"
          ).get(agent.wallet_address);
    
          let transparencyFields = {};
          if (agent.transparency_declaration) {
            try {
              const raw = JSON.parse(agent.transparency_declaration);
              for (const key of TRANSPARENCY_ALLOWED_KEYS) {
                if (raw[key] !== undefined && typeof raw[key] === 'string') {
                  transparencyFields[key] = raw[key].slice(0, 500);
                }
              }
            } catch (e) { /* invalid JSON */ }
          }
    
          const result = {
            success: true,
            agent_id: agent.id,
            agent_name: agent.name,
            ai_act: {
              risk_level: agent.ai_act_risk_level || 'not_declared',
              transparency: {
                is_ai_agent: true,
                human_sponsor: agent.human_sponsor || null,
                category: agent.category,
                ...transparencyFields,
              },
            },
            trust_status: {
              score: reputation?.score || 0,
              tier: reputation?.tier_label || 'new',
              active_stamp: stamp ? { tier: stamp.tier, expires_at: stamp.expires_at } : null,
            },
            verification: {
              wallet_verified: !!agent.wallet_verified,
              stamp_verified: !!stamp,
              compliance_url: `https://agentstamp.org/api/v1/compliance/report/${agent.id}`,
            },
          };
    
          return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
Behavior3/5

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

No annotations provided, so description carries full burden. Adds 'Free' (cost) and documents return structure (risk level, transparency declaration, audit summary, trust status) compensating for missing output schema. However, omits safety properties (read-only vs destructive), authentication requirements, rate limits, or error behaviors expected for a compliance tool.

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?

Three information-dense sentences with zero waste: purpose declaration, return value specification, and cost indicator. Front-loaded with action verb and appropriately terse given the simple single-parameter interface.

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?

Adequate for a read operation with one required parameter: describes the compliance domain and return payload compensating for lack of output schema. However, gaps remain regarding error handling (e.g., non-existent agent_id), data freshness/caching, and differentiation from reputation/trust tools that might overlap conceptually.

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 coverage is 100% with clear description and example for agent_id. Description makes no mention of parameters, but baseline 3 is appropriate when schema documentation is complete; no additional semantic guidance needed or provided.

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?

Excellent specificity: 'Get EU AI Act compliance report for an agent' provides exact verb, regulatory domain, resource type, and target. Clearly distinguishes from generic siblings like get_agent or trust_check by specifying compliance/regulatory scope.

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

Usage Guidelines3/5

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

Domain specificity ('EU AI Act') implies usage context for regulatory checks, but lacks explicit when-to-use guidance versus siblings like get_agent_reputation or trust_check. No prerequisites or exclusions mentioned despite handling sensitive compliance data.

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/vinaybhosle/agentstamp'

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