Skip to main content
Glama
derekgallardo01

m365-audit-mcp

find_orphaned_documents

Find documents in your tenant that have no owner or haven't been accessed recently. Use this tool for monthly governance review or before enabling Copilot to avoid leaking orphaned content.

Instructions

Find documents in the tenant that look orphaned.

A document is flagged if EITHER:

  • it has no owner (when include_no_owner is True), OR

  • it hasn't been accessed in days_threshold days.

Each flagged document includes a recommendation (archive, reassign, or review). Useful for monthly governance review or before enabling Copilot on a site (orphaned docs leak into Copilot grounding by default).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
days_thresholdNo
include_no_ownerNo
Behavior4/5

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

With no annotations, the description carries full burden. It explains the detection logic (EITHER condition) and consequence (orphaned docs leak into Copilot grounding). No contradictions.

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?

Two-paragraph structure: first states purpose, second explains conditions. Every sentence adds value. Could be slightly more structured (e.g., bullet list), but no waste.

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 tool with 2 parameters and no output schema, description covers detection logic, use cases, and implications (Copilot grounding). Complete for its complexity.

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?

Schema coverage is 0% but description adds meaning to both parameters: 'include_no_owner' controls flagging docs with no owner, 'days_threshold' sets access age. This goes beyond the schema's name and type.

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 clearly states the tool finds orphaned documents with two explicit conditions (no owner or not accessed within threshold) and mentions included recommendations. It distinguishes from sibling tools (audit, DLP, etc.) by focusing on orphan detection.

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

Usage Guidelines4/5

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

Provides clear use cases: monthly governance review or before enabling Copilot on a site. Does not explicitly state when not to use or compare to alternatives, but context is helpful.

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/derekgallardo01/m365-audit-mcp'

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