Skip to main content
Glama
threatlocker-mcp

threatlocker-mcp

by Space-C0wboy

Approval Request Permit Application

approval_request_permit_application

Approve a ThreatLocker permit application request by constructing the approval payload with application selection, policy scope, and action type to complete the approval workflow.

Instructions

Approve Permit Application Request WORKFLOW: take_ownership -> get_permit_application_by_id -> application_get_matching_list -> permit_application. Start from the DTO returned by get_permit_application_by_id and modify the choices below. REQUIRED FIELDS (KB-documented, all must be present): approvalRequest.approvalRequestId; approvalRequest.json -- copy verbatim from get_permit_application_by_id (server uses it to reconstruct file/action context, omitting it causes silent failures); userinstance -- the portal shard ('h', 'g', etc.), parsed from the request's portalApiUrl subdomain; isFromApproval: true; hasOriginApprovalCenter: true; actionType (copy from request: 'elevate'/'execute'/'install'); osType (1=Windows, 2=Mac, 3=Linux, 5=WinXP); organizationId, computerId (copy from request); organizationIds -- list of parent org IDs above the request's org ([] for top-level); fileDetails.fullPath. APP SELECTION (set exactly ONE mode on matchingApplications): (a) PREFERRED -- use application_get_matching_list result. Prefer tenant-owned match (its organizationId equals the call's organizationId) over master-org/BUILT-IN (organizationName: "master"). Set useMatchingApplication: true, populate matchingApplication with the chosen result; set others false and their objects to null. The DTO's hasMatchingApplication flag is UNRELIABLE -- trust application_get_matching_list.hasMatching instead. *** CRITICAL -- BUILT-IN match REQUIRES entire-org scope. When the chosen match has organizationName: "master", you MUST set policyLevel.toEntireOrganization: true. Pairing a BUILT-IN with computer-scope returns HTTP 401 "Missing the '' permission" (misleading -- it's actually a body-shape error). Verified 2026-05-21. Tenant-owned matches and new apps use the default all-flags-false scope. (b) FALLBACK -- add to existing custom app (discover via application_get_for_application_options). Set useExistingApplication: true, populate existingApplication; others null. (c) LAST RESORT -- create new app. Set useNewApplication: true and newApplicationName to a non-null derived name (e.g. file stem title-cased: vlc.exe -> "VLC"). Null returns HTTP 417 'Must enter a name for a new application'. POLICY (policyConditions.ruleId): 0=manual rules, 1=Install Mode 1hr, 2=Learning Mode 1hr, 3=Monitor Mode 1hr. Set useExistingPolicy: true to reuse an existing policy (manualOptions then carries the rule criteria). SCOPE (policyLevel): default 'this computer' = ALL THREE flags false (toEntireOrganization/toComputerGroup/toComputer); scope is inferred from top-level computerId. Setting toComputer: true returns HTTP 417 'Provided applies to ID does not associate with a known OS type'. For computer group, set toComputerGroup: true and populate selectedComputerGroup (discover via computer_group_get_dropdown_by_organization_id). For entire-org, set toEntireOrganization: true. ACTION TYPE: for elevate set isElevationRequest: true and isExecutionRequest: false; for execute reverse. Both are spec-readOnly but MUST be sent matching the action. SHAPE: send null (not omit) for unused sub-objects -- matchingApplication, existingApplication, selectedComputerGroup, policyExpirationDate, elevationExpirationDate. Wrong shape = opaque HTTP 500. PERMISSIONS: API key user needs one of 'Approve for Entire Organization', 'Approve for Group', 'Approve for Single Computer', or 'Approve for Single Computer Application Only' in Administrators.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "body": "<body>"
    },
    "name": "approval_request_permit_application"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesRequest body.
organization_idNoOverride the default organization (ManagedOrganizationId header).
override_organization_idNoOptional OverrideManagedOrganizationId header.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observedv0.2.1

TDQS

A4.9/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it warns of silent failures from omitting `approvalRequest.json`, flags `hasMatchingApplication` as UNRELIABLE, explains the misleading HTTP 401 'Missing the permission' caused by pairing BUILT-IN with computer scope, the 417 on null newApplicationName and on toComputer:true, and the opaque 500 from wrong null shapes. It also lists the exact admin permissions required. This is behavior an agent could not infer from the schema.

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 long but front-loaded with the workflow, then segmented into REQUIRED FIELDS / APP SELECTION / POLICY / SCOPE / ACTION TYPE / SHAPE / PERMISSIONS, so it is scannable rather than a wall of prose. A few clauses (e.g. the dated 'Verified 2026-05-21' note and repeated restatement of all-flags-false scope) could be trimmed, keeping it just short of a 5.

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

Completeness5/5

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

For a mutation tool with an enormous nested body, no annotations, and no output schema, the description covers required fields, branch selection, scope pitfalls, action-type booleans, null-shape requirements, and authorization. Nothing an agent needs to avoid a failing or silently wrong call appears to be missing.

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

Parameters5/5

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

Although the three top-level params are described, the ~200 nested body fields are undocumented in schema, and the description compensates heavily: which fields must be copied verbatim from the source DTO, that `userinstance` is parsed from portalApiUrl subdomain, osType integer encodings, ruleId 0-3 policy meanings, the mutually-exclusive useMatchingApplication/useExistingApplication/useNewApplication flags, and that unused sub-objects must be sent as null rather than omitted.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Approve Permit Application Request') and immediately maps the prerequisite call chain (take_ownership -> get_permit_application_by_id -> application_get_matching_list -> permit_application), naming sibling tools so the agent can distinguish this approval tool from the reject/ignore/update siblings. An agent knows exactly what this does and which calls precede it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit ranked decision procedure for the hardest choice: (a) PREFERRED matching application, (b) FALLBACK existing custom app, (c) LAST RESORT create new. Each branch names the discovery tool to use (application_get_matching_list, application_get_for_application_options) and states the selection rule (tenant-owned over master/BUILT-IN). Exclusions and preconditions are stated in the workflow line and PERMISSIONS section.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools