Skip to content

mcp_get_audit_history

PhuocLe edited this page Jun 20, 2026 · 3 revisions

Summary

Field Value
Tool name get_audit_history
MCP title Get record audit history
Category standard
Implementation DynamicsCrm.DevKit.Cli/Mcp/Tools/GetAuditHistoryTool.cs
Estimated token count ~379 tokens (tools/list tool JSON, o200k_base, measured 2026-06-18)
Last verified 2026-06-18

MCP Tool Description (Exact)

Audit history for Dataverse records (who/what/when/old/new). record_id set = detail (field-level, entity_name required). Empty = browse list (entity_name optional). Audit must be enabled at org AND entity. from_date/to_date overrides minutes_ago.

WHEN TO USE:
- Debug unexpected field changes
- Compliance / regulatory auditing
- Track user or integration activity

FUZZY/AMBIGUITY:
- user_filter by email/name may resolve multiple users; tool returns candidates and requires exact display name.

Parameters

Name Type Required Default Description
entity_name string No "" Entity Display Name or logical name. Required with record_id.
record_id string No "" GUID → detail. Empty = browse.
minutes_ago integer No 1440 Last N min. Max 43200. Ignored if from_date set.
user_filter string No "" User name (contains) or email (auto-resolved).
operation string No "" Create, Update, Delete, Activate, Deactivate, Assign, Merge, SetState.
attribute_name string No "" Detail only. Filter one field by Display Name or logical name.
max_records integer No 50 Max 500.
from_date string No "" ISO 8601 (e.g. '2026-03-01'). Overrides minutes_ago.
to_date string No "" ISO 8601. With from_date. Default = now.

Input Schema

{
  "type": "object",
  "properties": {
    "entity_name": {
      "type": "string",
      "description": "Entity Display Name or logical name. Required with record_id.",
      "default": ""
    },
    "record_id": {
      "type": "string",
      "description": "GUID → detail. Empty = browse.",
      "default": ""
    },
    "minutes_ago": {
      "type": "integer",
      "description": "Last N min. Max 43200. Ignored if from_date set.",
      "default": 1440
    },
    "user_filter": {
      "type": "string",
      "description": "User name (contains) or email (auto-resolved).",
      "default": ""
    },
    "operation": {
      "type": "string",
      "description": "Create, Update, Delete, Activate, Deactivate, Assign, Merge, SetState.",
      "default": ""
    },
    "attribute_name": {
      "type": "string",
      "description": "Detail only. Filter one field by Display Name or logical name.",
      "default": ""
    },
    "max_records": {
      "type": "integer",
      "description": "Max 500.",
      "default": 50
    },
    "from_date": {
      "type": "string",
      "description": "ISO 8601 (e.g. '2026-03-01'). Overrides minutes_ago.",
      "default": ""
    },
    "to_date": {
      "type": "string",
      "description": "ISO 8601. With from_date. Default = now.",
      "default": ""
    }
  },
  "required": []
}

Related MCP Resources

This tool does not require any MCP resources.

When To Use

  • Debug unexpected field changes
  • Compliance / regulatory auditing
  • Track user or integration activity

Notes

  • FUZZY/AMBIGUITY: user_filter by email/name may resolve multiple users; tool returns candidates and requires exact display name.

Example

{
  "entity_name": "string"
}

Output

Returns CallToolResult from the MCP server. The response content and structured fields follow the tool implementation and model returned by GetAuditHistoryTool.get_audit_history.

Prompt Examples

  • "Show audit changes for this account record from last week and highlight field-level updates."
  • "Find recent delete audit entries for contacts and include who performed each operation."
  • "Check whether this integration user changed the Status field on this record."

Clone this wiki locally