Skip to main content
Glama
mafzaal

Dynamics 365 Finance & Operations MCP Server

by mafzaal

d365fo_download_srs_report

Download business documents like invoices and purchase orders from Dynamics 365 Finance & Operations as PDF files by generating SSRS reports.

Instructions

Download SQL Server Reporting Services (SSRS/SRS) reports from D365 Finance & Operations as PDF files.

This tool generates and downloads business documents like invoices, purchase orders, confirmations, and other reports by calling the D365FO SRS reporting engine. The report is returned as a PDF file saved to a specified location.

Args: document_id: The unique identifier/key of the document (e.g., 'CIV-000708', 'SO-001234') legal_entity: The legal entity/company code (DataAreaId) where the document exists (e.g., 'USMF') controller_name: The SSRS controller class name (default: 'SalesInvoiceController') Common controllers: - SalesInvoiceController: Customer invoices - FreeTextInvoiceController: Free text invoices - CustDebitCreditNoteController: Debit/credit notes - SalesConfirmController: Sales confirmations - PurchPurchaseOrderController: Purchase orders data_table: The database table containing the document (default: 'CustInvoiceJour') data_field: The field name that stores the document ID (default: 'InvoiceId') document_type: Human-readable document type for filename (default: 'SalesInvoice') save_path: Full path where PDF should be saved (optional, auto-generates if not provided) profile: Configuration profile name (default: 'default')

Common controller/table/field combinations: | Controller | Table | Field Name | Field Type | Document Type | |-----------|-------|-----------|------------|---------------| | SalesInvoiceController | CustInvoiceJour | InvoiceId | Invoice ID | Sales Invoice | | FreeTextInvoiceController | CustInvoiceJour | InvoiceId | Invoice ID | Free Text Invoice | | CustDebitCreditNoteController | CustInvoiceJour | InvoiceId | Invoice ID | Debit/Credit Note | | SalesConfirmController | CustConfirmJour | ConfirmId or SalesId | Confirm/Sales ID | Sales Confirmation | | PurchPurchaseOrderController | VendPurchOrderJour | PurchId | Purchase Order ID | Purchase Order | Returns: Dictionary with download result including saved file path

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYes
legal_entityYes
controller_nameNoSalesInvoiceController
data_tableNoCustInvoiceJour
data_fieldNoInvoiceId
document_typeNoSalesInvoice
save_pathNo
profileNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries full burden and does well by explaining the tool generates reports via the D365FO SRS reporting engine, saves PDFs to specified locations, and returns a dictionary with download results. It could improve by mentioning authentication requirements, error conditions, or performance characteristics, but provides solid operational context.

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 well-structured with clear sections (overview, args, common combinations, returns) but could be more front-loaded. The initial paragraph effectively communicates the core purpose, though the detailed parameter explanations are necessary given the complexity. Every sentence earns its place in explaining this multi-parameter tool.

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?

Given the tool's complexity (8 parameters, 0% schema coverage, no annotations), the description provides complete context including parameter semantics, usage examples, controller mappings, and output format. The presence of an output schema means the description doesn't need to detail return values, and it adequately covers all other aspects needed for effective tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and 8 parameters, the description provides exceptional value by explaining each parameter's purpose, providing examples, defaults, and a comprehensive table mapping controllers to tables/fields. This fully compensates for the schema's lack of descriptions and gives the agent clear guidance on parameter usage.

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 specific action ('download SQL Server Reporting Services reports'), resource ('from D365 Finance & Operations'), and output format ('as PDF files'). It distinguishes from siblings by focusing on SRS report generation rather than direct document downloads like the specific invoice/purchase order tools, providing a more flexible alternative.

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 provides when to use this tool vs alternatives by listing common controller/table/field combinations and showing how it can generate various document types. It contrasts with sibling tools like 'd365fo_download_customer_invoice' by explaining this is a general SRS reporting engine approach rather than specialized document-specific downloads.

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/mafzaal/d365fo-client'

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