Skip to main content
Glama
mafzaal

Dynamics 365 Finance & Operations MCP Server

by mafzaal

d365fo_download_free_text_invoice

Download a free text invoice report as PDF from Dynamics 365 Finance & Operations. Specify invoice ID and legal entity to retrieve the document.

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
profileNodefault
save_pathNo
invoice_idYes
legal_entityYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations provided, so description carries full burden. It explains the download action, controller, and return format, but omits details on error handling, permissions, or limits, leading to moderate transparency.

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?

Structured with purpose, query guidance, example, and args list; front-loaded but slightly repetitive of schema. Mostly concise and clear.

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, no schema descriptions, and an output schema, the description thoroughly covers invoice discovery, parameter explanations, and return value, making it complete for the tool's complexity.

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 has 0% description coverage; the description adds significant value by providing examples for invoice_id and legal_entity, explaining save_path auto-generation, and noting profile default, compensating well for missing schema descriptions.

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?

Clearly states the tool downloads a free text invoice as PDF and distinguishes it from sales-order invoices, with specific mention of the controller and differentiation from sibling tools like download_customer_invoice.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on finding invoices via CustInvoiceJourBiEntity with a concrete example query, but does not explicitly name alternative tools for other invoice types, relying on implied context.

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