Skip to main content
Glama
arian-gogani

Nobulex MCP Compliance Server

check_action

Verify if an action complies with covenant rules by checking permissions against defined parameters to determine allowance or blockage.

Instructions

Check whether an action is allowed or blocked by the current covenant rules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesThe action name to check, e.g. 'delete_user'
paramsNoOptional parameters for the action

Implementation Reference

  • The core logic for checking an action against a set of rules.
    export function checkAction(
      action: string,
      _params: Record<string, unknown>,
      rules: Rule[]
    ): CheckResult {
      // Rules are evaluated in order; first match wins
      for (const rule of rules) {
        const matches =
          rule.action === "*" || rule.action === action || action.startsWith(rule.action + ".");
    
        if (!matches) continue;
    
        if (rule.type === "forbid") {
          return {
            allowed: false,
            action,
            matchedRule: rule,
            reason: rule.reason ?? `Action "${action}" is forbidden.`,
          };
        }
    
        if (rule.type === "permit") {
          return {
            allowed: true,
            action,
            matchedRule: rule,
            reason: rule.reason ?? `Action "${action}" is permitted.`,
          };
        }
    
        // "require" — treated as permit (the requirement is informational for the agent)
        if (rule.type === "require") {
          return {
            allowed: true,
            action,
            matchedRule: rule,
            reason: rule.reason ?? `Action "${action}" is permitted (requirement noted).`,
          };
        }
      }
    
      // Default: no matching rule → allowed (open policy)
      return {
        allowed: true,
        action,
        matchedRule: null,
        reason: `No rule matched action "${action}"; allowed by default.`,
      };
    }
  • src/index.ts:52-78 (registration)
    Registration of the 'check_action' tool in the MCP server.
    server.tool(
      "check_action",
      "Check whether an action is allowed or blocked by the current covenant rules.",
      {
        action: z.string().describe("The action name to check, e.g. 'delete_user'"),
        params: z
          .record(z.string(), z.unknown())
          .optional()
          .default({})
          .describe("Optional parameters for the action"),
      },
      async ({ action, params }) => {
        const result = checkAction(action, params, rules);
        auditLog.append(action, params, {
          allowed: result.allowed,
          reason: result.reason,
        });
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool checks action permissions but lacks details on what 'covenant rules' entail, whether this is a read-only operation, if it has side effects, error handling, or performance characteristics. For a tool with zero annotation coverage, this is insufficient.

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, clear sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded with the main function and appropriately sized for the tool's complexity, making it easy to parse.

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 the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., a boolean, detailed rule match, error messages) or behavioral aspects like idempotency or rate limits. For a permission-checking tool with no structured context, more detail is needed to guide effective 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?

The schema description coverage is 100%, so the input schema already documents both parameters ('action' and 'params') thoroughly. The description adds no additional meaning beyond what the schema provides, such as examples of 'covenant rules' or how parameters interact with them. Baseline 3 is appropriate when the schema does the heavy lifting.

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: 'Check whether an action is allowed or blocked by the current covenant rules.' It specifies the verb ('check') and the resource/scope ('action' against 'covenant rules'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'verify_log' or 'set_rules', which prevents a perfect score.

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 sibling tools like 'get_audit_log', 'set_rules', or 'verify_log', nor does it explain prerequisites, typical use cases, or exclusions. This leaves the agent without context for tool selection.

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/arian-gogani/nobulex-mcp'

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