Skip to main content
Glama

t2000_config

Configure transaction safeguards for AI agent banking by viewing or setting per-transaction and daily spending limits in dollars.

Instructions

View or set agent safeguard limits (per-transaction max, daily send limit). Use action "show" to view current limits, "set" to update. Values are in dollars. Set to 0 for unlimited.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes"show" to view current limits, "set" to update a limit
keyNoSetting to update: "maxPerTx" or "maxDailySend"
valueNoNew value in dollars (0 = unlimited)

Implementation Reference

  • Handler logic for the t2000_config tool, which handles both 'show' and 'set' actions to view or update safeguard limits.
    async ({ action, key, value }) => {
      try {
        if (action === 'show') {
          const config = agent.enforcer.getConfig();
          return {
            content: [{
              type: 'text',
              text: JSON.stringify({
                locked: config.locked,
                maxPerTx: config.maxPerTx,
                maxDailySend: config.maxDailySend,
                dailyUsed: config.dailyUsed,
              }),
            }],
          };
        }
    
        if (!key || value === undefined) {
          return errorResult(new Error('Both "key" and "value" are required for action "set"'));
        }
    
        if (key === 'locked') {
          return errorResult(new Error('Cannot set "locked" via config. Use t2000_lock to freeze operations.'));
        }
    
        if (key !== 'maxPerTx' && key !== 'maxDailySend') {
          return errorResult(new Error(`Unknown key "${key}". Valid keys: "maxPerTx", "maxDailySend"`));
        }
    
        if (value < 0) {
          return errorResult(new Error('Value must be a non-negative number'));
        }
    
        agent.enforcer.set(key, value);
        return {
          content: [{
            type: 'text',
            text: JSON.stringify({ updated: true, key, value }),
          }],
        };
      } catch (err) {
        return errorResult(err);
      }
    },
  • Zod schema definition for input arguments of t2000_config.
    {
      action: z.enum(['show', 'set']).describe('"show" to view current limits, "set" to update a limit'),
      key: z.string().optional().describe('Setting to update: "maxPerTx" or "maxDailySend"'),
      value: z.number().optional().describe('New value in dollars (0 = unlimited)'),
    },
  • Registration of the t2000_config tool within the MCP server.
    server.tool(
      't2000_config',
      'View or set agent safeguard limits (per-transaction max, daily send limit). Use action "show" to view current limits, "set" to update. Values are in dollars. Set to 0 for unlimited.',

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/mission69b/t2000'

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