Skip to main content
Glama
DynamicEndpoints

BOD-25-01-CSA-Microsoft-Policy-MCP

restrict_app_consent

Control application access by limiting consent permissions to administrators only, enhancing security in Microsoft 365 environments.

Instructions

Allow only administrators to consent to applications (MS.AAD.5.2v1)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the tool logic. It patches the app consent policy via Microsoft Graph API to enable restrictions, block user consent for risky apps, and require admin consent for new apps.
    private async restrictAppConsent() {
      try {
        // Configure app consent settings using Microsoft Graph API
        await this.graphClient
          .api('/policies/appConsentPolicy')
          .patch({
            isEnabled: true,
            blockUserConsentForRiskyApps: true,
            requireAdminConsentForNewApps: true,
          });
    
        return {
          content: [
            {
              type: 'text',
              text: 'Application consent restricted to administrators successfully',
            },
          ],
        };
      } catch (error: unknown) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to restrict app consent: ${error instanceof Error ? error.message : 'Unknown error'}`
        );
      }
    }
  • Registers the 'restrict_app_consent' tool in the list of available tools, including its description and input schema (empty object, no parameters required).
    {
      name: 'restrict_app_consent',
      description: 'Allow only administrators to consent to applications (MS.AAD.5.2v1)',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Defines the input schema for the tool as an empty object, indicating no input parameters are required.
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • Dispatch case in the CallToolRequest handler that routes calls to the restrictAppConsent method.
    case 'restrict_app_consent':
      return await this.restrictAppConsent();
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It implies a configuration change ('Allow only administrators') but does not specify whether this is a toggle, policy enforcement, or one-time action. Critical details like permissions required, reversibility, or impact on existing applications are missing, leaving significant gaps in understanding the tool's behavior.

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 directly states the tool's function. It is front-loaded with the core action and avoids redundancy. However, the appended 'MS.AAD.5.2v1' adds minor clutter without clear value, slightly detracting from perfect conciseness.

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 complexity of security configuration tools and the lack of annotations or output schema, the description is insufficient. It does not explain the outcome, such as whether the change is immediate or requires validation, nor does it address error conditions or dependencies. For a tool that likely modifies critical permissions, more context is needed to ensure safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately does not discuss parameters, focusing instead on the tool's purpose. This meets the baseline for tools with no parameters, as it avoids unnecessary details while maintaining relevance.

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: 'Allow only administrators to consent to applications' specifies the action (allow) and target (administrator consent for applications). It distinguishes from siblings like 'restrict_app_registration' and 'configure_admin_consent' by focusing on consent permissions rather than registration or alert configuration. However, the inclusion of 'MS.AAD.5.2v1' adds technical jargon without explanation, slightly reducing clarity.

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 does not mention prerequisites, such as requiring administrative permissions or specific conditions in Azure AD. Without context, users might confuse it with similar tools like 'configure_admin_consent' or 'restrict_group_consent', leading to potential misuse.

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/Automated-BOD-25-01-CISA-Microsoft-Policies-MCP'

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