Skip to main content
Glama

Call Microsoft Graph directly

graph_request
Read-onlyIdempotent

Send arbitrary requests to Microsoft Graph and get raw JSON responses when no dedicated tool covers the endpoint. Use OData query parameters like $select and $top to control response size.

Instructions

Sends an arbitrary request to Microsoft Graph and returns the raw JSON response. Use this only when no purpose-built tool covers the endpoint: the dedicated tools project and trim their results, while this one returns everything Graph sends, which is often far more text. The host is fixed to this tenant's Graph endpoint and path must be relative, so an absolute URL is rejected. GET is always available; the write methods require --allow-generic-write. Pass maxPages to follow @odata.nextLink, and prefer $select and $top in query to keep the response small.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoRequest body for a write method, as JSON. Ignored for GET. A string is sent as raw bytes (which is what Graph content endpoints expect); anything else is JSON-encoded.
pathYesGraph-relative path beginning with "/", e.g. "/me/messages" or "/users/alice@contoso.com/drive/root/children". Never a full URL: the host is fixed and an absolute URL is rejected. A "?query" suffix is accepted and merged with the `query` argument, but passing options in `query` is clearer.
queryNoQuery string parameters, e.g. {"$select":"id,subject","$top":"10"}. Values are sent verbatim, so OData operators belong here rather than spliced into `path`.
methodNoHTTP method. Defaults to GET. The write methods are refused unless the server was started with --allow-generic-write, and always under --read-only.
versionNoGraph endpoint. Defaults to the server default (v1.0). "beta" is refused unless the server was started with --beta; beta resources can change without notice.
maxPagesNoHow many pages of a collection to follow via @odata.nextLink, 1-5. Defaults to 1 (no paging). Pages are merged into a single value array.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context beyond annotations: it returns raw unprojected JSON ('often far more text'), follows @odata.nextLink when maxPages is set, merges pages into a single value array, and rejects absolute URLs. It also discloses that write methods are refused under --read-only. The only minor gap is not detailing error response shapes, but the description adds substantial context beyond the 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 compact and front-loaded: the core purpose and the key caveat ('returns everything Graph sends, which is often far more text') appear in the first two sentences. Every sentence earns its place, covering when to use, host/path constraints, write-method gating, and response-size control. No filler or repetition of schema details.

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 generic passthrough tool with 6 parameters, full schema coverage, and no output schema, the description covers everything an agent needs to call it correctly: when to use it, path constraints, method gating, paging behavior, and response-size guidance. The output is raw JSON, which the description states, so no output schema is needed. The only thing not detailed is error handling, but that is minor for a passthrough tool.

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 description coverage is 100%, so the schema already documents all 6 parameters thoroughly. The description adds meaningful semantics beyond the schema: it explains the host is fixed and path must be relative, that a '?query' suffix in path is merged with the query argument, that query values are sent verbatim, and that body strings are sent as raw bytes for content endpoints. This goes beyond the baseline 3 for full schema coverage.

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 states a specific verb ('Sends an arbitrary request to Microsoft Graph') and resource ('Microsoft Graph'), and explicitly distinguishes itself from purpose-built tools by noting they 'project and trim their results' while this returns raw JSON. This clearly differentiates it from the many sibling tools like mail_list_messages or files_get_item.

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 explicitly says 'Use this only when no purpose-built tool covers the endpoint' and names the alternative class ('the dedicated tools'). It also gives concrete guidance on when write methods are allowed (--allow-generic-write), when beta is refused (--beta), and how to keep responses small ($select, $top, maxPages). This is exemplary usage guidance.

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