Skip to main content
Glama
mafzaal

Dynamics 365 Finance & Operations MCP Server

by mafzaal

d365fo_download_free_text_invoice

Download free text invoice PDFs from Dynamics 365 Finance & Operations. Retrieve customer invoices not originating from sales orders by specifying invoice ID and legal entity.

Instructions

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

This is a convenience tool specifically configured for free text invoices using the FreeTextInvoiceController. Free text invoices are customer invoices that don't originate from sales orders.

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 free text invoices: d365fo_query_entities( entityName="CustInvoiceJourBiEntities", filter="InvoiceDate ge 2024-01-01", select=["InvoiceId", "InvoiceDate", "InvoiceAccount", "InvoiceAmount", "SalesType"] )

Args: invoice_id: The free text invoice number/ID (e.g., 'FTI-00000021', 'FTI-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 key behaviors: it's a download operation (implies read-only but not explicitly stated), saves a PDF file, and mentions auto-generation of save_path if not provided. However, it doesn't cover potential errors, rate limits, or authentication requirements, which would be helpful for a tool interacting with an external system like D365.

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 well-structured and efficiently organized. It starts with the core purpose, adds context about free text invoices, provides usage guidance with entity details and example, then clearly documents parameters and return value. Every sentence adds value - there's no redundant or unnecessary information.

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 (interacting with D365, file download), no annotations, 0% schema coverage, but with an output schema present, the description provides excellent completeness. It covers purpose, differentiation, prerequisites (how to find invoices), parameter semantics, and mentions the return format. The output schema handles return value details, so the description appropriately focuses on usage 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?

Schema description coverage is 0%, so the description must fully compensate. It does so excellently: each of the 4 parameters is explained with clear semantics, examples, and optionality. For 'invoice_id', it specifies format examples ('FTI-00000021'). For 'legal_entity', it gives company codes ('USMF'). For 'save_path', it explains auto-generation behavior. For 'profile', it provides the default value.

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 free text invoice report as PDF from D365 Finance & Operations.' It specifies the verb ('download'), resource ('free text invoice report'), format ('PDF'), and system ('D365 Finance & Operations'). It distinguishes from siblings like 'd365fo_download_customer_invoice' by explaining free text invoices are 'customer invoices that don't originate from sales orders.'

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 and how to use this tool. It states: 'To find available invoices to download, query the Customer Invoice Journal entity' and gives a detailed example using the sibling tool 'd365fo_query_entities'. It also clarifies the tool's scope: 'This is a convenience tool specifically configured for free text invoices using the FreeTextInvoiceController.'

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