Skip to main content
Glama

get_organization_policies

Retrieve policy assignments for a NinjaOne organization to manage security settings and compliance requirements.

Instructions

Get the policy assignments for a specific organization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organization_idYesNinjaOne organization ID

Implementation Reference

  • Handler function for 'get_organization_policies' tool that makes an API call to fetch policy assignments for a specific organization using the NinjaOne client
    async ({ organization_id }) => {
      try {
        const results = await client.get(
          `/organization/${organization_id}/policies`,
        );
        return toolResult(JSON.stringify(results, null, 2));
      } catch (error) {
        return toolResult(
          `Error fetching organization policies: ${error}`,
          true,
        );
      }
    },
  • Zod schema definition for the 'get_organization_policies' tool input parameter - requires organization_id as a number
    organization_id: z.number().describe("NinjaOne organization ID"),
  • Complete registration of 'get_organization_policies' tool with the MCP server, including name, description, schema, and handler function
    server.tool(
      "get_organization_policies",
      "Get the policy assignments for a specific organization.",
      {
        organization_id: z.number().describe("NinjaOne organization ID"),
      },
      async ({ organization_id }) => {
        try {
          const results = await client.get(
            `/organization/${organization_id}/policies`,
          );
          return toolResult(JSON.stringify(results, null, 2));
        } catch (error) {
          return toolResult(
            `Error fetching organization policies: ${error}`,
            true,
          );
        }
      },
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states a read operation ('Get'), implying it is likely safe and non-destructive, but does not specify permissions required, rate limits, pagination, or the format of returned policy assignments. This leaves significant gaps in understanding how the tool behaves beyond basic retrieval.

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 a single, clear sentence with no wasted words, making it highly concise and front-loaded. It efficiently conveys the core purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete for a tool that retrieves policy assignments. It does not explain what 'policy assignments' entail, the structure of the returned data, or any behavioral constraints, making it inadequate for full contextual understanding despite the simple parameter schema.

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?

The input schema has 100% description coverage, fully documenting the 'organization_id' parameter. The description adds no additional semantic details about the parameter, such as how to obtain the ID or its impact on results. Since the schema handles the heavy lifting, the baseline score of 3 is appropriate.

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 the verb 'Get' and the resource 'policy assignments for a specific organization,' making the purpose understandable. However, it does not distinguish this tool from its siblings (e.g., 'get_organization' or 'list_organizations'), which might also retrieve organization-related data, so it lacks sibling differentiation.

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 provides no guidance on when to use this tool versus alternatives, such as other 'get' or 'list' tools for organizations or policies. It does not mention prerequisites, exclusions, or specific contexts, leaving usage unclear relative to sibling tools.

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/fredriksknese/mcp-ninjaone'

If you have feedback or need assistance with the MCP directory API, please join our Discord server