retrieve_performance
Retrieve performance analytics from your LinkedIn dashboard to monitor engagement, track metrics, and optimize campaigns using the Linked API MCP server.
Instructions
Allows you to retrieve performance analytics from your LinkedIn dashboard (st.retrievePerformance action).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/retrieve-performance.ts:7-23 (handler)Defines the RetrievePerformanceTool class, which implements the 'retrieve_performance' tool handler by extending OperationTool, setting the tool name, operation name, empty input schema (z.object({})), and providing the tool description and input schema for MCP.export class RetrievePerformanceTool extends OperationTool<unknown, unknown> { public override readonly name = 'retrieve_performance'; public override readonly operationName = OPERATION_NAME.retrievePerformance; protected override readonly schema = z.object({}); public override getTool(): Tool { return { name: this.name, description: 'Allows you to retrieve performance analytics from your LinkedIn dashboard (st.retrievePerformance action).', inputSchema: { type: 'object', properties: {}, }, }; } }
- src/utils/linked-api-tool.ts:36-58 (handler)The base OperationTool class provides the core execution logic for the retrieve_performance tool by finding the corresponding LinkedAPI operation using the operationName and executing it with progress tracking.export abstract class OperationTool<TParams, TResult> extends LinkedApiTool<TParams, TResult> { public abstract readonly operationName: TOperationName; public override execute({ linkedapi, args, workflowTimeout, progressToken, }: { linkedapi: LinkedApi; args: TParams; workflowTimeout: number; progressToken?: string | number; }): Promise<TMappedResponse<TResult>> { const operation = linkedapi.operations.find( (operation) => operation.operationName === this.operationName, )! as Operation<TParams, TResult>; return executeWithProgress(this.progressCallback, operation, workflowTimeout, { params: args, progressToken, }); } }
- src/linked-api-tools.ts:30-70 (registration)Registers the RetrievePerformanceTool by importing and instantiating it within the LinkedApiTools class constructor, adding it to the array of available tools.export class LinkedApiTools { public readonly tools: ReadonlyArray<LinkedApiTool<unknown, unknown>>; constructor(progressCallback: (progress: LinkedApiProgressNotification) => void) { this.tools = [ // Standard tools new SendMessageTool(progressCallback), new GetConversationTool(progressCallback), new CheckConnectionStatusTool(progressCallback), new RetrieveConnectionsTool(progressCallback), new SendConnectionRequestTool(progressCallback), new WithdrawConnectionRequestTool(progressCallback), new RetrievePendingRequestsTool(progressCallback), new RemoveConnectionTool(progressCallback), new SearchCompaniesTool(progressCallback), new SearchPeopleTool(progressCallback), new FetchCompanyTool(progressCallback), new FetchPersonTool(progressCallback), new FetchPostTool(progressCallback), new ReactToPostTool(progressCallback), new CommentOnPostTool(progressCallback), new RetrieveSSITool(progressCallback), new RetrievePerformanceTool(progressCallback), // Sales Navigator tools new NvSendMessageTool(progressCallback), new NvGetConversationTool(progressCallback), new NvSearchCompaniesTool(progressCallback), new NvSearchPeopleTool(progressCallback), new NvFetchCompanyTool(progressCallback), new NvFetchPersonTool(progressCallback), // Other tools new ExecuteCustomWorkflowTool(progressCallback), new GetWorkflowResultTool(progressCallback), new GetApiUsageTool(progressCallback), ]; } public toolByName(name: string): LinkedApiTool<unknown, unknown> | undefined { return this.tools.find((tool) => tool.name === name); } }
- Defines the input schema for the retrieve_performance tool as an empty object using Zod.protected override readonly schema = z.object({});