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

get_api_usage

Get detailed API usage statistics for your LinkedIn account. Specify a start and end date (ISO 8601) to view usage within a 30-day maximum period.

Instructions

Retrieve Linked API usage statistics. Date range must not exceed 30 days.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
startYesStart date for the statistics period in ISO 8601 format (e.g., '2024-01-01T00:00:00Z')
endYesEnd date for the statistics period in ISO 8601 format (e.g., '2024-01-30T00:00:00Z')

Implementation Reference

  • The execute method that calls linkedapi.getApiUsage(args) to perform the tool's logic.
    public override async execute({
      linkedapi,
      args,
    }: {
      linkedapi: LinkedApi;
      args: TApiUsageParams;
      workflowTimeout: number;
      progressToken?: string | number;
    }): Promise<TMappedResponse<TApiUsageAction[]>> {
      return await linkedapi.getApiUsage(args);
    }
  • Zod schema defining input parameters: 'start' and 'end' (both ISO 8601 strings).
    protected readonly schema = z.object({
      start: z.string(),
      end: z.string(),
    });
  • Registration of GetApiUsageTool in the LinkedApiTools constructor (line 77).
      new GetApiUsageTool(progressCallback),
    ];
  • getTool() method returning the Tool definition with input schema (name, description, start/end params).
    public override getTool(): Tool {
      return {
        name: this.name,
        description: 'Retrieve Linked API usage statistics. Date range must not exceed 30 days.',
        inputSchema: {
          type: 'object',
          properties: {
            start: {
              type: 'string',
              description:
                "Start date for the statistics period in ISO 8601 format (e.g., '2024-01-01T00:00:00Z')",
            },
            end: {
              type: 'string',
              description:
                "End date for the statistics period in ISO 8601 format (e.g., '2024-01-30T00:00:00Z')",
            },
          },
          required: ['start', 'end'],
        },
      };
  • Abstract base class LinkedApiTool that GetApiUsageTool extends.
    export abstract class LinkedApiTool<TParams, TResult> {
      public abstract readonly name: string;
      protected abstract readonly schema: z.ZodSchema;
      protected readonly progressCallback: (progress: LinkedApiProgressNotification) => void;
    
      constructor(progressCallback: (progress: LinkedApiProgressNotification) => void) {
        this.progressCallback = progressCallback;
      }
    
      public abstract getTool(): Tool;
    
      public validate(args: unknown): TParams {
        return this.schema.parse(args) as TParams;
      }
    
      public abstract execute({
        linkedapi,
        args,
        workflowTimeout,
        progressToken,
      }: {
        linkedapi: LinkedApi;
        args: TParams;
        workflowTimeout: number;
        progressToken?: string | number;
      }): Promise<TMappedResponse<TResult>>;
    }
Behavior2/5

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

No annotations are provided, so the description bears full burden for behavioral disclosure. It only states the tool 'Retrieve's data, implying a read operation, but lacks details on side effects, authorization needs, rate limits, or output format. This is insufficient for understanding operational behavior.

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 concise sentences. The first states the purpose, the second adds a critical constraint. No wasted words or redundant information.

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?

For a simple two-parameter tool with no output schema, the description covers the basic constraint but omits what the returned statistics include (e.g., fields, granularity). Given the lack of output schema and multiple sibling tools, more detail on the output would improve completeness.

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?

Input schema has 100% coverage with descriptions for both parameters. The description adds only a 30-day range constraint, which is useful but does not significantly enhance understanding beyond the schema. Baseline is 3 due to high coverage, and no extra meaning is added.

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 it retrieves 'Linked API usage statistics', providing a specific verb and resource. While it distinguishes from admin-focused sibling tools like 'admin_get_limits_usage' by not mentioning 'admin', it doesn't explicitly differentiate from other statistics tools, so it's not a 5.

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 includes a constraint ('Date range must not exceed 30 days') but provides no guidance on when to use this tool versus alternatives like 'admin_get_limits_usage' or 'check_connection_status'. There is no mention of prerequisites, typical use cases, or exclusions.

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