Skip to main content
Glama
Linked-API
by Linked-API

admin_set_limits

Set rate limits per action category for an account, updating only specified limits while leaving others unchanged. Supports daily, weekly, or monthly periods for profile views, connections, messages, and more.

Instructions

Set rate limits for an account. Only specified limits are created or updated; other limits remain unchanged. Categories: stPersonProfileViews, stCompanyPageViews, stConnectionRequests, stMessages, stSearchQueries, stReactions, stComments, stPosts, nvPersonProfileViews, nvCompanyPageViews, nvMessages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdYesAccount UUID
limitsYesArray of limit configurations

Implementation Reference

  • The execute method that actually sets the limits by calling admin.limits.set(args)
    public override async execute({
      admin,
      args,
    }: {
      admin: LinkedApiAdmin;
      args: TSetLimitsParams;
    }): Promise<void> {
      await admin.limits.set(args);
    }
  • Zod schema defining input validation: accountId (string), limits (array of objects with category, period, maxValue, isEnabled)
    protected readonly schema = z.object({
      accountId: z.string(),
      limits: z.array(
        z.object({
          category: z.string(),
          period: z.enum(['daily', 'weekly', 'monthly']),
          maxValue: z.number().int().min(0),
          isEnabled: z.boolean().optional(),
        }),
      ),
    });
  • Registration of AdminSetLimitsTool in the adminTools array within LinkedApiTools constructor
      new AdminSetLimitsTool(),
      new AdminResetLimitsTool(),
    ];
  • Base AdminTool abstract class that AdminSetLimitsTool extends, providing the validate method and abstract execute/getTool contracts
    import { LinkedApiAdmin } from '@linkedapi/node';
    import { Tool } from '@modelcontextprotocol/sdk/types.js';
    import z from 'zod';
    
    export abstract class AdminTool<TParams, TResult> {
      public abstract readonly name: string;
      protected abstract readonly schema: z.ZodSchema;
    
      public abstract getTool(): Tool;
    
      public validate(args: unknown): TParams {
        return this.schema.parse(args) as TParams;
      }
    
      public abstract execute({
        admin,
        args,
      }: {
        admin: LinkedApiAdmin;
        args: TParams;
      }): Promise<TResult>;
    }
  • getTool() returning the full MCP Tool definition with name, description, and JSON Schema input schema
    public override getTool(): Tool {
      return {
        name: this.name,
        description:
          'Set rate limits for an account. Only specified limits are created or updated; other limits remain unchanged. Categories: stPersonProfileViews, stCompanyPageViews, stConnectionRequests, stMessages, stSearchQueries, stReactions, stComments, stPosts, nvPersonProfileViews, nvCompanyPageViews, nvMessages.',
        inputSchema: {
          type: 'object',
          properties: {
            accountId: {
              type: 'string',
              description: 'Account UUID',
            },
            limits: {
              type: 'array',
              description: 'Array of limit configurations',
              items: {
                type: 'object',
                properties: {
                  category: {
                    type: 'string',
                    description: 'Limit category',
                  },
                  period: {
                    type: 'string',
                    enum: ['daily', 'weekly', 'monthly'],
                    description: 'Limit period',
                  },
                  maxValue: {
                    type: 'number',
                    description: 'Maximum allowed actions (>= 0)',
                  },
                  isEnabled: {
                    type: 'boolean',
                    description: 'Whether this limit is enforced (default: true)',
                  },
                },
                required: ['category', 'period', 'maxValue'],
              },
            },
          },
          required: ['accountId', 'limits'],
        },
      };
    }
Behavior3/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. It discloses that only specified limits are updated, which is a key behavioral trait. However, it lacks details on permissions, side effects (e.g., if limits are enabled/disabled), or error states, which are important for a mutation 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?

The description is two sentences with no superfluous information. The first sentence states the core action, and the second provides the key nuance (partial update) and lists categories. It is well-structured and efficient.

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?

Given no annotations, no output schema, and only two parameters, the description covers the essential behavior. However, it omits the return value (if any), error conditions, or authentication requirements, which would improve completeness for an admin tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has 100% coverage with parameter descriptions. The description adds value by enumerating the specific allowed categories, which goes beyond the schema's generic 'Limit category' description. This helps the agent understand valid values.

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 sets rate limits for an account and lists the categories, distinguishing it from siblings like admin_reset_limits. However, it could more explicitly differentiate when to use this tool versus resetting limits.

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?

The description implies usage by noting that only specified limits are updated, but it does not provide explicit guidance on when to use this tool versus alternatives like admin_reset_limits. No when-not or context for selection is given.

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/Linked-API/linkedapi-mcp'

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