Skip to main content
Glama
mafzaal

Dynamics 365 Finance & Operations MCP Server

by mafzaal

d365fo_download_customer_invoice

Download customer invoice PDFs from Dynamics 365 Finance & Operations using invoice ID and legal entity parameters. This tool simplifies invoice retrieval with preset configurations for quick access.

Instructions

Download a customer invoice report as PDF from D365 Finance & Operations.

This is a convenience tool with preset configurations for customer invoices. Use this when you need to quickly download customer invoices without specifying all the technical parameters.

To find available invoices to download, query the Customer Invoice Journal entity:

  • Entity name: CustInvoiceJourBiEntity

  • Collection name: CustInvoiceJourBiEntities

  • Key fields: InvoiceId, InvoiceDate, InvoiceAccount, InvoiceAmount, SalesType, dataAreaId

  • Use d365fo_query_entities tool to search for invoices

Example query to find invoices: d365fo_query_entities( entityName="CustInvoiceJourBiEntities", filter="InvoiceDate ge 2024-01-01", select=["InvoiceId", "InvoiceDate", "InvoiceAccount", "InvoiceAmount", "SalesType"] )

Args: invoice_id: The customer invoice number/ID (e.g., 'CIV-000708', 'INV-2024-001') legal_entity: The legal entity/company code (e.g., 'USMF', 'DEMF') save_path: Full path where PDF should be saved (optional, auto-generates if not provided) profile: Configuration profile name (default: 'default')

Returns: Dictionary with download result including saved file path

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_idYes
legal_entityYes
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 the full burden of behavioral disclosure. It effectively describes the tool as a 'convenience tool with preset configurations' that downloads PDFs and optionally auto-generates save paths. It mentions the return format (dictionary with download result) and provides practical context about invoice discovery. However, it doesn't mention potential limitations like file size, authentication requirements, or error conditions.

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: purpose statement, usage guidelines, entity query instructions with example, parameter explanations, and return value description. While comprehensive, it's appropriately sized for a tool with 4 parameters and complex prerequisites. The example query adds value but slightly reduces conciseness.

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 (requires invoice discovery via another tool), 0% schema description coverage, no annotations, but with an output schema, the description is remarkably complete. It covers purpose, usage context, prerequisites (how to find invoices), all parameter semantics, and mentions the return format. The output schema handles return value details, so the description appropriately focuses on operational context.

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, the description fully compensates by providing detailed semantic information for all 4 parameters. It explains what each parameter represents (e.g., 'customer invoice number/ID', 'legal entity/company code'), provides concrete examples (e.g., 'CIV-000708', 'USMF'), and notes optionality and defaults (e.g., 'optional, auto-generates if not provided', 'default: default').

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: 'Download a customer invoice report as PDF from D365 Finance & Operations.' It specifies the exact action (download), resource (customer invoice report), and format (PDF), and distinguishes itself from sibling tools like d365fo_download_debit_credit_note by focusing specifically on customer invoices.

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 explicit guidance on when to use this tool: 'Use this when you need to quickly download customer invoices without specifying all the technical parameters.' It also provides clear alternatives by directing users to query entities first using d365fo_query_entities and specifying the exact entity name, collection, and key fields to find available invoices.

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