admin_get_limits_usage
Retrieve current usage statistics against configured rate limits for a LinkedIn account. Input account UUID to monitor API consumption and prevent rate limit issues.
Instructions
Get current usage against configured rate limits for an account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | Account UUID |
Implementation Reference
- The handler/execute function that calls admin.limits.getUsage(args) to retrieve current rate limit usage for a given account.
public override async execute({ admin, args, }: { admin: LinkedApiAdmin; args: TGetLimitsUsageParams; }): Promise<{ usage: Array<TLimitUsage> }> { return await admin.limits.getUsage(args); } - Zod schema defining the required input parameter: accountId (string).
protected readonly schema = z.object({ accountId: z.string(), }); - MCP Tool schema definition with description and inputSchema declaring accountId as required string.
public override getTool(): Tool { return { name: this.name, description: 'Get current usage against configured rate limits for an account.', inputSchema: { type: 'object', properties: { accountId: { type: 'string', description: 'Account UUID', }, }, required: ['accountId'], }, }; } - src/linked-api-tools.ts:88-88 (registration)Tool registration: instantiated in the adminTools array of LinkedApiTools, making it available via adminToolByName().
new AdminGetLimitsUsageTool(), - src/utils/admin-tool.ts:5-22 (helper)Abstract base class AdminTool that AdminGetLimitsUsageTool extends. Provides validate() and enforces execute() and getTool() contracts.
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>; }