Skip to main content
Glama

m365_retrieve

Retrieve raw text chunks from Microsoft 365 for AI analysis and cross-document reasoning. Get relevance-scored excerpts from SharePoint and OneDrive to maintain control over content synthesis.

Instructions

Retrieve raw text chunks from M365 for YOUR AI to reason over.

Returns relevance-scored excerpts from SharePoint/OneDrive—you control synthesis.

Use for:
- Custom analysis and cross-document reasoning
- When you need source text, not just answers
- Deep research where you want control over synthesis

Use m365_chat instead for:
- Quick Q&A where M365's answer is sufficient
- Calendar/email questions
- People lookup

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language query for enterprise content. Be specific: include document types, projects, or topics. E.g., 'Q4 revenue projections for ACME deal' not just 'revenue'.
data_sourceNoWhere to search: 'sharepoint' (team sites, wikis), 'onedrive' (personal files), 'connectors' (external systems via Copilot connectors)sharepoint
filter_expressionNoOptional KQL filter to narrow scope. Examples: 'path:https://contoso.sharepoint.com/sites/HR', 'FileType:pdf', 'LastModifiedTime>2024-01-01'
max_resultsNoNumber of text chunks to return (1-25). More chunks = more context but longer processing.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by explaining the tool returns 'relevance-scored excerpts' and that the user controls synthesis. However, it doesn't mention potential limitations like rate limits, authentication requirements, or error conditions. The behavioral context is good but not comprehensive for a tool with no annotations.

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

Conciseness5/5

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

The description is perfectly structured and concise. It starts with the core purpose, then provides clear usage guidelines in bullet-point format. Every sentence earns its place by adding value - no repetition or fluff. The information is front-loaded with the most important details first.

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

Completeness4/5

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

Given the tool's complexity (4 parameters, no output schema, no annotations), the description does well but has some gaps. It explains the tool's purpose and usage excellently, but doesn't describe the return format or what 'relevance-scored excerpts' look like. For a retrieval tool with no output schema, more detail about the response structure would be helpful. However, the strong usage guidelines compensate somewhat.

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%, so the schema already documents all parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema. It mentions the tool retrieves from 'SharePoint/OneDrive' which aligns with the data_source parameter, but this is already covered in the schema. Baseline 3 is appropriate when schema does the heavy lifting.

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's purpose: 'Retrieve raw text chunks from M365 for YOUR AI to reason over.' It specifies the verb ('retrieve'), resource ('raw text chunks from M365'), and distinguishes from sibling tools by contrasting with m365_chat for different use cases. The description explicitly mentions SharePoint/OneDrive sources and the tool's role in providing source text for analysis.

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?

The description provides excellent usage guidelines with explicit 'Use for' and 'Use m365_chat instead for' sections. It clearly distinguishes when to use this tool (custom analysis, source text needs, deep research) versus alternatives (quick Q&A, calendar/email questions, people lookup). The guidelines are specific and actionable, helping the agent choose between sibling tools.

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/renepajta/m365-copilot-mcp'

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