linear_getOrganization
Retrieve details about your Linear organization to manage projects and teams effectively through the Linear MCP Server.
Instructions
Get information about the current Linear organization
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- Handler function that creates and returns the async executor for the linear_getOrganization tool, delegating to LinearService.getOrganizationInfo()export function handleGetOrganization(linearService: LinearService) { return async (args: unknown) => { try { return await linearService.getOrganizationInfo(); } catch (error) { logError("Error getting organization information", error); throw error; } }; }
- Tool schema definition for linear_getOrganization, specifying input (empty) and output schema matching organization fieldsexport const getOrganizationToolDefinition: MCPToolDefinition = { name: "linear_getOrganization", description: "Get information about the current Linear organization", input_schema: { type: "object", properties: {}, }, output_schema: { type: "object", properties: { id: { type: "string" }, name: { type: "string" }, urlKey: { type: "string" }, logoUrl: { type: "string" } } } };
- src/tools/handlers/index.ts:54-57 (registration)Registration of the linear_getOrganization handler within the registerToolHandlers function that returns the tools maplinear_getViewer: handleGetViewer(linearService), linear_getOrganization: handleGetOrganization(linearService), linear_getUsers: handleGetUsers(linearService), linear_getLabels: handleGetLabels(linearService),
- src/services/linear-service.ts:23-34 (helper)LinearService method that fetches the organization data using LinearClient.organization and returns formatted object with id, name, urlKey, logoUrl, createdAt, and subscriptionasync getOrganizationInfo() { const organization = await this.client.organization; return { id: organization.id, name: organization.name, urlKey: organization.urlKey, logoUrl: organization.logoUrl, createdAt: organization.createdAt, // Include subscription details if available subscription: organization.subscription || null, }; }