Skip to main content
Glama
mafzaal

Dynamics 365 Finance & Operations MCP Server

by mafzaal

d365fo_download_debit_credit_note

Download debit or credit note reports as PDF files from Dynamics 365 Finance & Operations. Retrieve customer invoice adjustment documents by specifying invoice ID and legal entity.

Instructions

Download a debit/credit note report as PDF from D365 Finance & Operations.

This is a convenience tool specifically configured for debit and credit notes using the CustDebitCreditNoteController. These are adjustment documents for customer invoices.

To find available documents 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 debit/credit note invoice ID (e.g., 'DN-000123', 'CN-000456') 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 full burden and does well: it explains this is a convenience tool configured for specific documents, mentions it generates PDF files, describes the optional save_path behavior (auto-generates if not provided), and specifies the return format. It doesn't mention authentication, rate limits, or error handling, but covers core behavior adequately.

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?

Well-structured with purpose first, then usage guidance, example, and parameter details. The example query is detailed but necessary. Slightly long but every section earns its place. Could be slightly more concise in the example formatting.

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 4 parameters with 0% schema coverage and no annotations, the description provides complete context: clear purpose, detailed usage instructions with sibling tool integration, parameter explanations with examples, and mentions the return dictionary. The output schema exists, so return values don't need explanation. Excellent coverage for this complexity level.

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 explaining all 4 parameters: invoice_id is the debit/credit note ID with examples, legal_entity is the company code with examples, save_path is optional with auto-generation behavior, and profile has a default value. This adds crucial meaning beyond the bare schema.

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 downloads a specific report type (debit/credit note) as PDF from D365FO, using the CustDebitCreditNoteController. It distinguishes from sibling tools like d365fo_download_customer_invoice by specifying it's for adjustment documents, not regular 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 explicitly provides when to use this tool (for debit/credit notes) and when to use an alternative (d365fo_query_entities to find available documents first). It includes a complete example query and specifies the entity and key fields needed for preparation.

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