Docs
MCP serverAvailable tools

Get payroll summary

Summarize the payroll issued today, over the last 7 days, or this calendar month, ending on the organization's current day. The total is valid issued Type N payroll receipts on their CFDI date before deductions (their subtotal: perceptions plus other payments), with the receipt count. net reached employees and isrWithheld was withheld as ISR; the rest went to other deductions (IMSS, Infonavit, loans). isrPayment is the payroll ISR of the next monthly payment. Employees rank the calendar month. It is not employer cost: IMSS contributions and state payroll tax (ISN) are excluded.

MCP toolget_payroll_summary

Purpose

Summarize recent payroll issued, its net pay and ISR withheld, and top employees.

Use when
You need the payroll issued recently, as on the payroll page.
Do not use when
You need employer cost (IMSS, ISN) or a past fiscal month or year.
Required permissions
analytics:read
Side effects
None
Idempotency
Idempotent

Input schema

JSON Schema
{  "type": "object",  "properties": {    "period": {      "description": "The organization's current day, the 7 days ending on it, or its calendar month so far; defaults to last_7_days",      "allOf": [        {          "enum": [            "today",            "last_7_days",            "month"          ]        }      ]    }  },  "$schema": "http://json-schema.org/draft-07/schema#",  "additionalProperties": false}

Output schema

JSON Schema
{  "type": "object",  "properties": {    "data": {      "type": "object",      "properties": {        "dateFrom": {          "$ref": "#/definitions/__schema0"        },        "dateTo": {          "$ref": "#/definitions/__schema0"        },        "total": {          "type": "number"        },        "receipts": {          "type": "number"        },        "net": {          "type": "number"        },        "isrWithheld": {          "type": "number"        },        "isrPayment": {          "type": "object",          "properties": {            "month": {              "$ref": "#/definitions/__schema1"            },            "isrWithheld": {              "type": "number"            }          },          "required": [            "month",            "isrWithheld"          ],          "additionalProperties": false        },        "employees": {          "type": "object",          "properties": {            "month": {              "$ref": "#/definitions/__schema1"            },            "items": {              "type": "array",              "items": {                "type": "object",                "properties": {                  "name": {                    "type": "string"                  },                  "amount": {                    "type": "number"                  },                  "isOther": {                    "type": "boolean"                  },                  "counterpartyId": {                    "anyOf": [                      {                        "type": "string"                      },                      {                        "type": "null"                      }                    ]                  },                  "share": {                    "type": "number"                  }                },                "required": [                  "name",                  "amount",                  "isOther",                  "counterpartyId",                  "share"                ],                "additionalProperties": false              }            }          },          "required": [            "month",            "items"          ],          "additionalProperties": false        },        "source": {          "const": "payroll_summary"        },        "currency": {          "const": "MXN"        },        "period": {          "enum": [            "today",            "last_7_days",            "month"          ]        },        "amountBasis": {          "const": "before_deductions"        }      },      "required": [        "dateFrom",        "dateTo",        "total",        "receipts",        "net",        "isrWithheld",        "isrPayment",        "employees",        "source",        "currency",        "period",        "amountBasis"      ],      "additionalProperties": false    },    "error": {      "$schema": "http://json-schema.org/draft-07/schema#",      "type": "object",      "properties": {        "code": {          "enum": [            "validation_error",            "unauthenticated",            "forbidden",            "payment_required",            "not_found",            "method_not_allowed",            "conflict",            "idempotency_conflict",            "operation_in_progress",            "recovery_required",            "migration_required",            "rate_limited",            "provider_unavailable",            "internal"          ]        },        "message": {          "type": "string"        },        "details": {          "type": "object",          "properties": {            "document": {              "type": "object",              "properties": {                "documentRef": {                  "type": "string",                  "pattern": "^(invoice|withholding|sales_receipt|declaration|tax_compliance_opinion|sales_receipt_refund):.+$"                },                "editable": {                  "type": "boolean"                }              },              "required": [                "documentRef",                "editable"              ],              "additionalProperties": false            },            "issues": {              "type": "array",              "items": {                "type": "object",                "properties": {                  "path": {                    "type": "array",                    "items": {                      "anyOf": [                        {                          "type": "string"                        },                        {                          "type": "number"                        }                      ]                    }                  },                  "message": {                    "type": "string"                  },                  "code": {                    "type": "string"                  }                },                "required": [                  "path",                  "message"                ],                "additionalProperties": false              }            },            "retryable": {              "type": "boolean"            },            "retryAfterSeconds": {              "type": "integer",              "exclusiveMinimum": 0,              "maximum": 9007199254740991            },            "reason": {              "type": "string"            },            "balanceMinor": {              "type": "integer",              "minimum": 0,              "maximum": 9007199254740991            },            "topUpUrl": {              "type": "string"            }          },          "additionalProperties": false        }      },      "required": [        "code",        "message"      ],      "additionalProperties": false    }  },  "$schema": "http://json-schema.org/draft-07/schema#",  "additionalProperties": false,  "definitions": {    "__schema0": {      "type": "string",      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"    },    "__schema1": {      "type": "string",      "pattern": "^\\d{4}-\\d{2}$"    }  },  "oneOf": [    {      "required": [        "data"      ]    },    {      "required": [        "error"      ]    }  ]}

Related workflow

See the canonical workflows in the introduction

Related tools