Skip to main content
Glama

get-active-rules

List active access rules to understand why secret access was blocked in the SecureCode secrets vault.

Instructions

List active MCP access rules. Read-only — rules can only be created or modified from the dashboard. Use this to understand why access to a secret was blocked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the get-active-rules MCP tool, which fetches active access rules from the SecureCode client and formats them for the user.
    // Tool: get-active-rules (read-only)
    server.tool(
      'get-active-rules',
      'List active MCP access rules. Read-only — rules can only be created or modified from the dashboard. Use this to understand why access to a secret was blocked.',
      {},
      async () => {
        try {
          const client = getClient();
          const rules = await client.getActiveRules();
          if (rules.length === 0) {
            return wrapResponse([{ type: 'text', text: 'No active MCP rules configured.' }]);
          }
          const lines = rules.map(r => {
            const condStr = r.conditions
              .map(c => `${c.tagKey}:${c.tagValue}`)
              .join(r.conditionOperator === 'AND' ? ' AND ' : ' OR ');
            return `• ${r.name} — when [${condStr}] → ${r.action}`;
          });
          return wrapResponse([{
            type: 'text',
            text: `${rules.length} active rules:\n${lines.join('\n')}\n\nManage rules at securecodehq.com/dashboard/mcp-rules`,
          }]);
        } catch (error) {
          return errorResult(error);
        }
      },
    );

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/juanisidoro/securecode-mcp'

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