get_organizations
Retrieve a list of organizations you manage on LinkedIn. Use this to view organizations where you have administrative access.
Instructions
List organizations the user administers.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_organizations"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/organization/index.ts:15-31 (handler)Handler function that executes the get_organizations tool logic by calling the LinkedIn client.
export async function handleOrganizationTool(name: string, args: any, client: LinkedInClient) { switch (name) { case "get_organizations": { const result = await client.getOrganizations(); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } default: throw new McpError(ErrorCode.MethodNotFound, `Unknown organization tool: ${name}`); } } - src/tools/organization/index.ts:4-13 (schema)Tool schema definition for get_organizations with name, description, and input schema (no inputs).
export const organizationTools = [ { name: "get_organizations", description: "List organizations the user administers.", inputSchema: { type: "object", properties: {}, }, }, ]; - src/index.ts:76-78 (registration)Registration of the get_organizations tool in the CallToolRequestSchema handler, routing to handleOrganizationTool.
if (organizationTools.some((t) => t.name === name)) { return await handleOrganizationTool(name, args, linkedinClient); } - src/index.ts:47-55 (registration)Registration of organizationTools (including get_organizations) in the ListToolsRequestSchema handler.
server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ ...profileTools, ...contentTools, ...networkTools, ...organizationTools, ], }; - src/linkedin-client.ts:106-109 (helper)Helper method in LinkedInClient that makes the actual API call to LinkedIn's /organizationAcls endpoint.
async getOrganizations() { const response = await this.client.get("/organizationAcls?q=roleAssignee"); return response.data; }