ninja_get_organization
Retrieve detailed information about a specific organization by its ID. Access organization-specific data for management and reporting.
Instructions
Get detailed information about a specific organization.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Organization ID |
Implementation Reference
- src/tools/organizations.ts:37-50 (handler)Tool definition and handler for 'ninja_get_organization'. Makes a GET request to /organization/{id} to retrieve detailed info about a specific organization. Requires 'id' parameter.
{ tool: { name: 'ninja_get_organization', description: 'Get detailed information about a specific organization.', inputSchema: { type: 'object', required: ['id'], properties: { id: { type: 'number', description: 'Organization ID' }, }, }, }, handler: async ({ id }, client: NinjaOneClient) => client.get(`/organization/${id}`), }, - src/tools/organizations.ts:38-47 (schema)Input schema for 'ninja_get_organization'. Requires an object with a required numeric 'id' property describing the organization ID.
tool: { name: 'ninja_get_organization', description: 'Get detailed information about a specific organization.', inputSchema: { type: 'object', required: ['id'], properties: { id: { type: 'number', description: 'Organization ID' }, }, }, - src/tools/index.ts:5-5 (registration)Import of organizationTools from the organizations module, which includes the 'ninja_get_organization' tool definition.
import { organizationTools } from './organizations.js'; - src/tools/index.ts:13-24 (registration)ALL_TOOLS array where organizationTools (including 'ninja_get_organization') are spread and exported for registration.
export const ALL_TOOLS = [ ...deviceTools, ...organizationTools, ...alertTools, ...activityTools, ...ticketingTools, ...queryTools, ...policyTools, ...userTools, ...backupTools, ...systemTools, ]; - src/tools/types.ts:4-8 (helper)ToolDef interface defining the shape of tool objects: a 'tool' (name, description, inputSchema) and a 'handler' function.
export interface ToolDef { tool: Tool; // eslint-disable-next-line @typescript-eslint/no-explicit-any handler: (args: any, client: NinjaOneClient) => Promise<unknown>; }