Skip to main content
Glama
MCP Active Directory Server

MCP Active Directory Server

by AlexLiAtDuo

ad_ldap_query

Run LDAP queries against a domain controller to find matching Active Directory objects and return selected attributes for directory searches and troubleshooting.

Instructions

Run an LDAP query against the DC. Returns matching objects with specified attributes.

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": {
      "filter": "<filter>"
    },
    "name": "ad_ldap_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results to return (default: 10, max: 1000)
filterYesLDAP filter, e.g., '(objectClass=user)' or '(&(objectClass=user)(sAMAccountName=alice))'
targetNoTarget DC name from credentials (optional)
attributesNoAttributes to return, e.g., ['sAMAccountName', 'memberOf']. Empty = all.
searchBaseNoSearch base DN, e.g., 'OU=Users,DC=corp,DC=local'. Leave empty for domain root.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral burden. It states that the tool runs a query and returns objects, but it does not disclose permissions, authentication requirements, whether the operation is read-only, rate limits, or the impact of broad queries.

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 two concise sentences with no wasted wording, and it front-loads the core action. It is appropriately sized, though it is perhaps too terse for a tool with no annotations.

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 five parameters, no annotations, and no output schema, the description is too sparse. It does not explain result structure, authentication context, target DC selection, or error behavior, leaving important gaps for an agent deciding how to invoke the tool safely and correctly.

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%, and the schema already documents all five parameters with examples and defaults. The description adds only the phrase 'specified attributes', which is already covered by the schema's attributes field, so it does not add meaningful parameter semantics beyond the structured data.

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 states a specific verb and resource: run an LDAP query against the DC and return matching objects. This is clear and actionable, but it does not explicitly differentiate its generic query capability from siblings such as ad_test_ldap_bind or ad_get_user_groups.

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 offers no guidance on when to use this tool versus the sibling tools. It does not mention prerequisites, exclusions, or situations where a more specific tool would be preferable.

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