Skip to main content
Glama

search_context_docs

Read-onlyIdempotent

WHEN: the user asks about business/functional context that lives OUTSIDE the D365 code KB -- specs, functional design docs, mapping sheets, contracts, meeting notes, screenshots' captions -- anything an admin uploaded via the admin portal's 'Context Documents' library (PDF, Word .docx, Excel .xlsx/.xlsm, CSV, plain text/Markdown/JSON). Does NOT search X++ code or AOT objects -- use search_d365_code / get_object_details for that. Triggers: 'what does the spec say about...', 'check the mapping document for...', 'cherche dans les documents de contexte', 'according to the functional design'. An excerpt containing a 'Image N' marker has a picture the text cannot convey (a diagram, a screenshot): call again with includeImages=true to receive those pictures inline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural-language search query.
maxResultsNoMax distinct documents to return (1-20). Default 8.
includeImagesNoAttach the images embedded in the matched documents (Word only). Off by default because each picture is inlined as base64 and is far larger than the text around it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / includeImages
      Added value: +{
      +  "default": false,
      +  "description": "Attach the images embedded in the matched documents (Word only). Off by default because each picture is inlined as base64 and is far larger than the text around it.",
      +  "type": "boolean"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare the tool read-only, idempotent, and non-destructive. The description adds valuable behavioral context: it searches only admin-uploaded documents, returns text excerpts, and explains that 'Image N' markers indicate embedded pictures that require includeImages=true to retrieve. It does not contradict the annotations and gives useful operational detail.

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 dense but every sentence earns its place: scope, exclusions, triggers, and the image-marker edge case are all covered. It is front-loaded with the WHEN guidance and uses clear signposting ('WHEN', 'Does NOT search', 'Triggers'). No filler or redundant restatement of the name.

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?

The description covers scope, exclusions, alternatives, triggers, and the image-inclusion behavior. Since there is no output schema, a brief explicit statement of the result shape (e.g., ranked document excerpts) would have made it fully complete, but the excerpt and image references strongly imply it. Overall, it is sufficient for an agent to invoke the tool correctly.

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 100%, so the schema already documents all parameters well. The description adds extra semantic value by explaining natural-language trigger examples for 'query' and the practical workflow for 'includeImages' when image markers appear. This goes slightly beyond the schema descriptions without repeating them.

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 and resource: searching business/functional context documents stored in the 'Context Documents' library, explicitly listing supported file types. It clearly distinguishes itself from search_d365_code and get_object_details by stating what it does NOT search. The trigger examples further pin down the intended purpose.

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 WHEN to use the tool, provides concrete trigger phrases, and names alternatives for code/AOT searches. It also gives practical guidance on how to handle excerpts containing 'Image N' markers by calling again with includeImages=true. This leaves no ambiguity about when to select this tool over siblings.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.