Skip to main content
Glama
DynamicEndpoints

Microsoft 365 Core MCP Server

manage_intune_macos_apps

Destructive

Deploy, update, and manage macOS applications in Intune by assigning apps to groups, controlling versions, and handling installation requirements.

Instructions

Manage macOS application deployment including app assignments, updates, and installation requirements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesIntune macOS app management action
appIdNoApp ID for app-specific operations
bundleIdNomacOS app bundle identifier
nameNoApplication name
versionNoApplication version
assignmentGroupsNoTarget groups for app deployment

Implementation Reference

  • The core handler function that implements all logic for the manage_intune_macos_apps tool, handling actions like list, get, deploy, update, remove, and sync_status using Microsoft Graph API endpoints for Intune macOS app management.
    export async function handleIntuneMacOSApps(
      graphClient: Client,
      args: IntuneMacOSAppArgs
    ): Promise<{ content: { type: string; text: string }[] }> {
      let apiPath = '';
      let result: any;
    
      switch (args.action) {
        case 'list':
          // List macOS applications
          apiPath = '/deviceAppManagement/mobileApps';
          apiPath += `?$filter=deviceType eq 'macOS'`;
          
          if (args.appType) {
            apiPath += ` and microsoft.graph.${args.appType}`;
          }
    
          result = await graphClient.api(apiPath).get();
          break;
    
        case 'get':
          if (!args.appId) {
            throw new McpError(ErrorCode.InvalidParams, 'appId is required for get action');
          }
          apiPath = `/deviceAppManagement/mobileApps/${args.appId}`;
          result = await graphClient.api(apiPath).get();
          break;
    
        case 'deploy':
          if (!args.appId || !args.assignment) {
            throw new McpError(ErrorCode.InvalidParams, 'appId and assignment are required for deploy action');
          }
    
          apiPath = `/deviceAppManagement/mobileApps/${args.appId}/assignments`;
          const deploymentPayload = {
            mobileAppAssignments: args.assignment.groupIds.map(groupId => ({
              target: {
                '@odata.type': '#microsoft.graph.groupAssignmentTarget',
                groupId: groupId
              },
              intent: args.assignment?.installIntent || 'available',
              settings: {
                '@odata.type': '#microsoft.graph.macOSLobAppAssignmentSettings',
                uninstallOnDeviceRemoval: true
              }
            }))
          };
    
          result = await graphClient.api(apiPath).post(deploymentPayload);
          break;
    
        case 'update':
          if (!args.appId) {
            throw new McpError(ErrorCode.InvalidParams, 'appId is required for update action');
          }
    
          apiPath = `/deviceAppManagement/mobileApps/${args.appId}`;
          const updatePayload = {
            displayName: args.appInfo?.displayName,
            description: args.appInfo?.description,
            publisher: args.appInfo?.publisher,
            bundleId: args.appInfo?.bundleId,
            buildNumber: args.appInfo?.buildNumber,
            versionNumber: args.appInfo?.versionNumber,
            minimumSupportedOperatingSystem: args.appInfo?.minimumSupportedOperatingSystem
          };
    
          result = await graphClient.api(apiPath).patch(updatePayload);
          break;
    
        case 'remove':
          if (!args.appId) {
            throw new McpError(ErrorCode.InvalidParams, 'appId is required for remove action');
          }
    
          apiPath = `/deviceAppManagement/mobileApps/${args.appId}`;
          await graphClient.api(apiPath).delete();
          result = { message: 'App removed successfully' };
          break;
    
        case 'sync_status':
          if (!args.appId) {
            throw new McpError(ErrorCode.InvalidParams, 'appId is required for sync_status action');
          }
    
          // Get app installation status across devices
          apiPath = `/deviceAppManagement/mobileApps/${args.appId}/deviceStatuses`;
          result = await graphClient.api(apiPath).get();
          break;
    
        default:
          throw new McpError(ErrorCode.InvalidParams, `Invalid action: ${args.action}`);
      }
    
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • src/server.ts:767-785 (registration)
    MCP server registration of the manage_intune_macos_apps tool, specifying description, input schema, annotations, and the wrapped handler function.
      "manage_intune_macos_apps",
      "Manage macOS application deployment including app assignments, updates, and installation requirements.",
      intuneMacOSAppSchema.shape,
      {"readOnlyHint":false,"destructiveHint":true,"idempotentHint":false},
      wrapToolHandler(async (args: IntuneMacOSAppArgs) => {
        this.validateCredentials();
        try {
          return await handleIntuneMacOSApps(this.getGraphClient(), args);
        } catch (error) {
          if (error instanceof McpError) {
            throw error;
          }
          throw new McpError(
            ErrorCode.InternalError,
            `Error executing tool: ${error instanceof Error ? error.message : 'Unknown error'}`
          );
        }
      })
    );
  • TypeScript interface defining the input parameters (IntuneMacOSAppArgs) for the tool handler, including actions and app deployment configurations.
    export interface IntuneMacOSAppArgs {
      action: 'list' | 'get' | 'deploy' | 'update' | 'remove' | 'sync_status';
      appId?: string;
      appType?: 'webApp' | 'officeSuiteApp' | 'microsoftEdgeApp' | 'microsoftDefenderApp' | 'managedIOSApp' | 'managedAndroidApp' | 'managedMobileLobApp' | 'macOSLobApp' | 'macOSMicrosoftEdgeApp' | 'macOSMicrosoftDefenderApp' | 'macOSOfficeSuiteApp' | 'macOSWebClip' | 'managedApp';
      assignment?: {
        groupIds: string[];
        installIntent: 'available' | 'required' | 'uninstall' | 'availableWithoutEnrollment';
        deliveryOptimizationPriority?: 'notConfigured' | 'foreground';
      };
      appInfo?: {
        displayName: string;
        description?: string;
        publisher: string;
        bundleId?: string;
        buildNumber?: string;
        versionNumber?: string;
        packageFilePath?: string;
        minimumSupportedOperatingSystem?: string;
        ignoreVersionDetection?: boolean;
        installAsManaged?: boolean;
      };
    }
  • Zod schema (intuneMacOSAppSchema) used for input validation and MCP tool discovery, defining parameters for macOS app management actions.
    export const intuneMacOSAppSchema = z.object({
      action: z.enum(['list', 'get', 'deploy', 'update', 'remove']).describe('Intune macOS app management action'),
      appId: z.string().optional().describe('App ID for app-specific operations'),
      bundleId: z.string().optional().describe('macOS app bundle identifier'),
      name: z.string().optional().describe('Application name'),
      version: z.string().optional().describe('Application version'),
      assignmentGroups: z.array(z.string()).optional().describe('Target groups for app deployment'),
    });
  • Tool metadata providing description, title, and annotations (readOnlyHint, destructiveHint, etc.) for the manage_intune_macos_apps tool.
    manage_intune_macos_apps: {
      description: "Manage macOS application deployment including app assignments, updates, and installation requirements.",
      title: "Intune macOS App Manager",
      annotations: { title: "Intune macOS App Manager", readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true }
Behavior3/5

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

Annotations indicate destructiveHint=true, readOnlyHint=false, and idempotentHint=false, covering key behavioral traits. The description adds some context by mentioning 'deployment' and 'updates', which implies mutation operations consistent with annotations. However, it doesn't disclose additional details like rate limits, authentication needs, or specific destructive effects beyond what annotations provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Manage macOS application deployment') and lists key aspects. There's no wasted verbiage, but it could be slightly more structured by explicitly separating functions or adding brief context.

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

Completeness3/5

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

Given the tool's complexity (6 parameters, destructive operations, no output schema), the description is adequate but not complete. It covers the general scope but lacks details on output format, error handling, or specific use cases. With annotations providing safety information, it meets minimum viability but leaves gaps for an agent to fully understand tool behavior.

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?

Schema description coverage is 100%, with all parameters well-documented in the schema itself. The description mentions 'app assignments, updates, and installation requirements', which loosely maps to parameters like 'assignmentGroups', 'action' (update), and possibly 'bundleId'/'version', but adds minimal semantic value beyond the schema. This meets the baseline for high schema coverage.

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 tool's purpose as managing macOS application deployment with specific aspects like assignments, updates, and installation requirements. It uses specific verbs ('manage', 'deployment') and identifies the resource ('macOS application'). However, it doesn't explicitly differentiate from sibling tools like 'manage_intune_windows_apps' or 'manage_intune_macos_devices', which would be needed for a perfect score.

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. It mentions general functions but doesn't specify contexts, prerequisites, or exclusions. With many sibling tools available (e.g., 'manage_intune_windows_apps', 'manage_intune_macos_devices'), the lack of differentiation leaves the agent without clear usage criteria.

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/DynamicEndpoints/m365-core-mcp'

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