Zenskar MCP Server
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ZENSKAR_API_KEY | No | Your Zenskar API key for authentication. | |
| ZENSKAR_AUTH_TOKEN | No | Bearer token from browser devtools (alternative to API key, short-lived). | |
| ZENSKAR_ORGANIZATION | No | Your Zenskar Organization ID from the dashboard. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| listCustomersB | Retrieve a paginated list of customers, with options for searching, filtering by ID, external ID, email, phone number, communication status, auto-charge status, creation date, customer name, and business entity ID. |
| getCustomerByIdC | Retrieve details for a specific customer by their ID. |
| listContactsC | Retrieve a paginated list of contacts. |
| getContactByIdA | Retrieve details for a specific contact by their ID. |
| listInvoicesA | Retrieve a paginated list of invoices, with options for filtering by customer, status, amounts, due date, creation date, and related customer/contract details. Invoice amounts and amount filters are in major units (25 means $25.00). |
| getInvoiceByIdB | Retrieve details for a specific invoice by its ID. Invoice amounts are in major units (25 means $25.00). |
| getInvoiceGenerationStatusC | Get the generation status of a specific invoice. |
| getInvoiceByExternalIdC | Retrieve details for an invoice using its external ID. |
| downloadInvoiceC | Download an invoice in JSON format. |
| getInvoicePreviewHtmlA | Get the rendered HTML preview of an invoice. Returns the invoice as it would appear when sent to the customer. Use this to show the customer-facing invoice layout. |
| getInvoiceContractJsonActualsB | Get contract actuals in JSON format for a specific invoice. |
| getInvoicePaymentsA | Get successful payments currently associated with a specific invoice. This view may omit refund records and non-success payment states. Payment amounts are in cents. |
| generateInvoicePaymentLinkC | Generate a payment link for a specific invoice. |
| payInvoiceA | Initiate payment for an invoice using a payload. MONEY-MOVING ACTION — only call when the user explicitly authorizes payment for this specific invoice. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| getInvoiceLineItemsC | Get details about the invoice line items, features, and pricing models. |
| getInvoiceSummaryB | Get a summary of a specific invoice. |
| getAllInvoiceTagsB | Get all available tags for invoices. |
| getCustomerPortalConfigurationC | Retrieve the customer portal configuration. |
| listAggregatesB | List Billable Metrics in paginated form, with filtering by ID, name, and data source. |
| getAggregateSchemasA | Show the underlying storage/schema definitions for Billable Metrics. Mainly useful for advanced debugging, SQL/schema inspection, and integration work rather than day-to-day business operations. |
| getAggregateEstimatesC | Get Billable Metric estimates based on the specified criteria. |
| getAggregateByIdB | Get the details of a Billable Metric by its ID. |
| getAggregateLogsB | Get logs related to a Billable Metric (also called an aggregate) by ID, with optional date and customer filters. |
| createAggregateB | Create a new Billable Metric. Requires a name, data schema, aggregation queries, visual query builder config, and a data source. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| updateAggregateA | Update an existing Billable Metric. All body fields are optional — only send fields you want to change. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| deleteAggregateA | Permanently delete a Billable Metric. DESTRUCTIVE: cannot be undone. ONLY call when the user explicitly says 'delete' or 'remove' for THIS billable metric. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| listRawMetricsC | List Usage Events. Supports filtering by ID, name, and API slug. |
| createRawMetricA | Create a new Usage Event schema. This defines the schema used for ingesting usage events. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| getRawMetricByIdC | Get Usage Event details by ID. |
| getRawMetricLogsA | Get recent Usage Event rows for a resource by ID. Returns the most recent event rows; backend does NOT support filters, pagination, ordering, or aggregation on this endpoint. For filtered/aggregated queries use the aggregate endpoints. |
| getRawMetricBySlugB | Get Usage Event details by API slug. |
| getInvoicePaymentsByIdA | Get successful payments associated with a specific invoice ID. This endpoint is success-only and may not show refund rows. Payment amounts are in cents. |
| getInvoicePaymentsWithoutRefundsA | Get original payment records for an invoice, excluding refund payment rows. Refunded or partially refunded original payments may still appear here. Payment amounts are in cents. |
| getPaymentByIdB | Retrieve details for a specific payment by its ID. Payment amounts are in cents. |
| getCurrentDateTimeC | Get the current system date and time in multiple formats for temporal context |
| listAllPaymentsA | Retrieve a paginated list of all payments, including refund records, with extensive filtering and sorting options. Payment amounts and amount filters are in cents. |
| createContractPromptA | Save a reusable AI extraction prompt that drives contract data extraction (used by extractContractFromRaw). Use this to create / update / version the instructions the AI follows when parsing raw contract text. |
| listContractsB | Retrieve a paginated list of contracts, with extensive options for filtering by ID, customer ID, name, start date, end date, creation date, and status. |
| createEntitlementA | Creates a new entitlement in the system with various attributes including name, description, type, units, and product association. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| listEntitlementsB | List entitlements in paginated form, with filtering by ID, name, type, product, and active status. |
| getEntitlementByIdA | Get the details of an entitlement by its ID. |
| updateEntitlementA | Update an existing entitlement's details. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| deleteEntitlementA | Permanently delete an entitlement. DESTRUCTIVE: cannot be undone. ONLY call when the user explicitly says 'delete' or 'remove' for THIS entitlement. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| approveInvoiceA | Approve an invoice; sets status to approved. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| recogniseRevenueA | Recognize revenue for the organization up to a specified end_date. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| listRevenuePostingsB | Retrieve a paginated list of revenue postings (per-period revenue allocations against revenue contracts and performance obligations). Supports filtering by contract, revenue contract, performance obligation, posting date, and currency. |
| refreshRevenuePostingsA | Recalculate and upsert revenue postings for a specific revenue contract item / performance obligation at a given posting date. All five identifiers are required (the backend rejects partial inputs). Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| createBusinessEntityA | Creates a new business entity in the system with various attributes including name, address, contact details, tax configuration, and logo. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| createCustomerC | Creates a new customer in the system with various attributes including address, tax info, and contact details. |
| ingestRawMetricEventA | Ingest a Usage Event for the specified resource slug. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| ingestRawMetricEventsBulkA | Ingest MULTIPLE Usage Events for the specified resource slug in a single API call (bulk ingestion). Use this instead of calling ingestRawMetricEvent once per event — it sends one HTTP request carrying every event, which is far more efficient for CSV/batch imports. Each element of 'events' has the same shape as ingestRawMetricEvent's 'event' arg: customer_id, timestamp, and a data map with schema-compliant types. If importing from a CSV (or any source) whose column names don't clearly correspond to the expected fields (customer_id, timestamp, data.*), confirm the mapping with the user before constructing events — do not guess a mapping silently. Limit: 500 events per call — split larger batches into multiple calls. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| extractContractFromRawA | Extract structured contract data from raw text content using AI. This tool analyzes natural language contract descriptions and extracts key fields like dates, products, pricing, and billing terms. The extracted data can then be used to create a customer and contract via createCustomer and createContract tools. |
| createContractA | Create a new contract in Zenskar. Use this after extracting contract data via extractContractFromRaw and creating a customer via createCustomer. The contract includes customer details, pricing phases, products, and billing configuration. |
| getContractByIdA | Retrieve a contract by its ID, including all phases, pricings, customer details, custom attributes, and renewal policy. Essential for cloning contracts for renewals, reviewing terms before amendments, and validating contract state. |
| updateContractA | Update an existing contract. This is a PUT endpoint — you MUST fetch the contract first with getContractById, then send ALL required fields including phases. Without phases the API returns 500. Copy phases from the GET response (each phase needs name, start_date, end_date at minimum). Renewal: renew_with_default_contract, renew_with_existing, do_not_renew. EXPIRY: this tool CANNOT expire, end, terminate or cancel a contract. Contract status is derived from the CONTRACT-LEVEL end_date; phase end_dates never affect it. If the user asks to expire/end/terminate/cancel a contract, or to 'set' or 'update' its expiry date, you MUST call expireContract instead of this tool — it sets the end_date and also prunes future phases, trims overlapping phases and caps product dates, which this tool does not. Setting a past end_date here is rejected. |
| deleteContractA | Permanently delete a DRAFT contract. ONLY works on contracts with status='draft'. Do NOT call on ACTIVE, EXPIRED, or PAUSED contracts. DESTRUCTIVE: removes all phases, products, and pricing associations. NEVER call as automatic recovery from another failed operation (e.g., do not retry as a fallback after expireContract or voidInvoice fails). ONLY call when the user explicitly says 'delete' or 'remove' for THIS draft contract. If a non-destructive action fails, surface the error verbatim and stop. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| getContractAmendmentsB | Retrieve all amendments for a contract. Shows history of changes, expansions, upgrades, and modifications made to the contract over time. |
| getContractBillingCyclesA | Returns the contract's pre-computed billing cycles as a list of {name, start_date, end_date, bill_for_date, billing_cycle_start_day}. REQUIRED before calling generateInvoice. Workflow: (1) call this tool, (2) pick the cycle entry whose date range covers the period you want to invoice, (3) pass that entry's |
| createContractPhaseA | Add a new phase to an existing contract. Use this for add-on expansions, mid-contract changes, or creating distinct billing periods with different pricing. Phase type enum: active, pause, trial. |
| createContractPhasePricingA | Add pricing to a contract phase. REQUIRED: pass EXACTLY ONE of |
| expireContractA | THE ONLY tool that can expire, end, terminate or cancel contracts — use it whenever the user wants contracts to stop on a given date, including when they phrase it as 'update the expiry date'. Do NOT use updateContract for this. To expire SEVERAL contracts, pass every id in contractIds on a SINGLE call — never call this tool once per contract, as each call raises its own approval dialog and only the most recent one can be approved. Expire an ACTIVE or PAUSED contract by adjusting its end_date. Allowed status transitions: ACTIVE→EXPIRED, PAUSED→EXPIRED. EXPIRED is terminal — calling on an already-expired contract returns 400; do NOT retry, do NOT escalate to deleteContract or any other destructive tool as a fallback. Verify contract.status via getContractById before calling. Idempotency: NO. The contract expires at end of day 23:59:59.999999. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| voidInvoiceA | Void an invoice. ONLY works on approved or paid invoices with invoice_total == 0 (zero-balance, typically after a full credit-note offset). For non-zero approved invoices, issue a credit note via createInvoiceCreditNote first to bring the balance to zero, then void. If the call returns INVOICE_CANNOT_BE_VOIDED, surface that error verbatim — do NOT retry, do NOT escalate to deleteInvoice. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| deleteInvoiceA | Permanently delete a draft invoice. ONLY works on status='draft'. For approved invoices, use voidInvoice (with caveats) or createInvoiceCreditNote — do NOT call deleteInvoice on approved invoices. DESTRUCTIVE: record removed permanently. ONLY call when the user explicitly says 'delete' for THIS invoice; never call as automatic recovery from another failed operation. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| createInvoiceCreditNoteC | Create a credit note against a specific invoice. Returns the created credit note. |
| generateInvoiceA | Generate an invoice for a single contract+customer over a billing window. Granularity is PER PHASE, NOT per product. ONE call generates ONE invoice covering ALL products active in the (contract, customer, from_date, to_date) window — every product becomes a line item on the same invoice. NEVER iterate over products. MANDATORY PRE-STEP: call Date fields accept ISO-8601 strings (e.g. Known failure modes:
• |
| listCreditNotesB | Retrieve a paginated list of credit notes. Supports cursor-based pagination. Credit note amounts are in cents. |
| getCreditNoteByIdA | Retrieve a credit note by its ID, including amount, status, customer, invoice association, and line items URL. Credit note amounts are in cents. |
| createPaymentA | Record a successful manual/offline payment or tax-withheld amount, equivalent to the frontend Add Payment flow. Link to invoices via payment_parts array. Use type='payment' with payment_method='bank_transfer', 'check', 'cash', or 'card'. Use type='tax_withheld' without payment_method. Always use status='success'. Do not use status='created' for manually recorded payments; created payments are unrealized and will not reduce invoice amount_due or mark invoices paid. The backend assigns the payment timestamp when the payment is recorded. Refunds, authorizations, reversals, payment links, and gateway charge attempts are outside this tool's scope. |
| updatePaymentB | Update a payment's invoice allocations. The API requires a non-empty request body with payment_parts. |
| deleteManualPaymentA | Permanently delete a manual payment record. Only works on payments in an eligible status for deletion. DESTRUCTIVE — only call when the user explicitly says 'delete' for THIS payment; never as automatic recovery from another failed operation. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| refundPaymentB | Refund a payment (full or partial). Pass refund_amount=0 (or full original amount) for a full refund, or a smaller positive integer for a partial refund. refund_destination + writeoff_invoices control where the refund money goes and whether linked invoices are written off. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| createInvoiceChargeB | Create an auto-charge for an invoice. Triggers payment collection via the customer's configured payment method. |
| editManualPaymentC | Edit a manual payment's details (amount, method, etc.). Uses the manual_payment-specific endpoint. |
| updateCustomerB | Update an existing customer's details. Supports partial updates — only send fields you want to change. Can update name, email, address, phone, communications_enabled, auto_charge_enabled, etc. |
| listProductsB | Retrieve a paginated list of products. Products define what is being sold and can be associated with pricing and contracts. |
| getProductByIdA | Retrieve a product by its ID, including name, SKU, description, tax codes, pricing, and custom attributes. |
| getChartOfAccountsA | Retrieve the chart of accounts for the organization, listing all account categories and their hierarchical structure. |
| listAccountsB | Retrieve a paginated list of accounting accounts (GL accounts) with optional filtering. |
| createAccountC | Create a new accounting (GL) account. |
| listJournalEntriesB | Retrieve a paginated list of journal entries with optional filtering by date, status, account, or job. Filters use fastapi-filter conventions (e.g. posted_at__gte=YYYY-MM-DD, lines__account_id=). Debits and credits are in cents. |
| createJournalEntryC | Create a new manual journal entry with debit and credit lines. |
| getJournalEntryA | Retrieve a journal entry by its ID, including all journal lines. Debits and credits are in cents. |
| listJournalLinesB | Retrieve a paginated list of journal lines (individual debit/credit entries) across all journal entries. Supports filtering by customer, contract, account, currency, and parent journal entry posted date. Debits and credits are in cents. |
| getBalanceSheetB | Retrieve the balance sheet report (assets, liabilities, equity). Supports per-customer / per-contract / per-account scoping via filters and currency / cadence selection. |
| getIncomeStatementB | Retrieve the income statement (P&L) report. Supports per-customer / per-contract / per-account scoping via filters and currency / cadence selection. |
| getAccountBalanceB | Retrieve the balance for a specific accounting account. Supports filtering by customer, contract, currency, and posted-at date range. |
| createProductC | Create a new product in the catalog. |
| updateProductC | Update an existing product's details. |
| getProductPricingsB | Retrieve all pricing configurations for a specific product. |
| createProductPricingA | Create a new pricing configuration for a product. MANDATORY pre-call checklist — ask the user for ALL of these and do NOT default any silently: (1) currency (ISO 4217), (2) pricing_type (per_unit|flat_fee|tiered|volume|percent|package|step|matrix), (3) unit_amount in MAJOR currency units (float — 3 means $3, NOT 300 cents), (4) quantity object with type (fixed|metered) and unit label (e.g. 'user', 'request') and either quantity (for fixed) or aggregate_id (for metered), (5) billing_period.cadence (ISO 8601 — 'P1M' monthly, 'P3M' quarterly, 'P1Y' yearly) and billing_period.offset. SKIPPING quantity OR billing_period causes the Zenskar UI to render 'Undefined- Every Undefined Undefined' for billing cadence and 0 for billing metric — that is the #1 bug reported on this tool. |
| listPlansA | Retrieve a paginated list of plans that define reusable contract structures. Hits /plans — the same data the Zenskar app's Plans page reads. |
| getPlanByIdA | Retrieve a plan by its ID, including phases, products, and pricing configurations. |
| createPlanA | Create a new plan — a reusable contract template with phased pricing. Hits POST /plans (same Plan table the Zenskar app's PlansV2 page reads). The request body shape is NESTED, not flat: top-level fields are name, status, schedule, optional description, optional phases[]. Currency is set per-pricing inside phase.pricings[].pricing.pricing_data.currency, NOT at the top level. A plan with no phases is unusable in the UI — always include at least one phase. Plan starts as 'draft'; the user must publish it to make it active. |
| listCustomAttributesB | Retrieve a list of custom attribute definitions configured for the organization. |
| createCustomAttributeC | Create a new custom attribute definition for an entity type. |
| listTaxCategoriesB | Retrieve a list of tax categories configured for the organization. |
| createTaxCategoryC | Create a new tax category. |
| listJobsB | Retrieve a paginated list of async jobs (invoice generation, revenue recognition, etc.). |
| getJobByIdB | Retrieve a specific job by its ID to check status and results. |
| createContactB | Create a new contact associated with a customer. |
| updateContactB | Update an existing contact's details. Supports partial updates. |
| listBusinessEntitiesB | Retrieve a list of business entities configured for the organization. |
| getBusinessEntityByIdB | Retrieve a business entity by its ID. |
| updateBusinessEntityC | Update an existing business entity's details. |
| listCustomerAddressesB | Retrieve all addresses for a specific customer. |
| createCustomerAddressB | Add a new address to a customer. |
| updateCustomerAddressC | Update an existing customer address. |
| listPaymentMethodsB | Retrieve all payment methods for a specific customer. |
| attachPaymentMethodC | Attach a payment method to a customer. |
| deleteCustomerA | Permanently delete a customer by ID. DESTRUCTIVE and cannot be undone. The customer must not have active contracts or unpaid invoices. ONLY call when the user explicitly says 'delete' for THIS customer; never as automatic recovery from another failed operation. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| deleteContactA | Permanently delete a contact by ID. DESTRUCTIVE — only call when the user explicitly says 'delete' for THIS contact; never as automatic recovery from another failed operation. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| deletePaymentMethodA | Permanently delete a payment method from a customer. DESTRUCTIVE — saved card/bank details will be removed; recurring auto-charges using this method will fail. Only call when the user explicitly says 'delete' for THIS payment method. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling. |
| pauseContractA | Pause an active contract. ALWAYS ask the user explicitly for both 'start_date' and 'unpause_extension_policy' before calling — do NOT silently default. A future-dated start_date will create a scheduled pause that has not yet begun; the contract's top-level status stays 'active' until start_date passes. Use 'editPauseContract' to adjust the pause window or set a resume date afterward. |
| editPauseContractA | Edit an existing pause phase on a contract. Use this when 'resumeContract' returns 'pause phase not found' for a future-dated pause, or when the user wants to set a resume date (pause end_date), shift the pause start, or change the unpause_extension_policy. Hits PATCH /contract_v2/{contractId}/pause. |
| resumeContractA | Resume a contract that is currently in an actively-running pause. MANDATORY FLOW: (1) ASK the user 'What date should the contract resume from?' — never call without a known resume date even though this endpoint takes no body. (2) Call getContractById and check the pause phase's start_date. (3a) If pause start_date is strictly in the past (pause currently active) AND the user wants to resume immediately/today → call this endpoint. (3b) If pause start_date is today OR in the future, OR the user wants a specific future resume date → call 'editPauseContract' with end_date=<resume_date> instead. The error 'pause phase not found' does NOT mean no pause exists — it means no pause has yet started; on this error, automatically pivot to 'editPauseContract' with the resume date. Never escalate to deleteContract or any destructive fallback. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| zenskar-app |
TDQS
Scored across 115 tools
The set contains several near-duplicate invoice-payment retrieval tools (getInvoicePayments, getInvoicePaymentsById, getInvoicePaymentsWithoutRefunds) plus related payment and contract lifecycle variants that an agent could easily misselect. Detailed descriptions mitigate many cases, but with 115 tools the boundaries remain hard to navigate.
Nearly all tools use camelCase verb_noun names, making the set largely predictable. Minor deviations such as edit vs update, listAllPayments, and getInvoicePayments lacking a ById suffix keep it from perfect consistency.
115 tools is far beyond a well-scoped set for this server and includes many narrow retrieval variants and configuration helpers. The surface would be much more coherent if grouped or pruned.
Core customer, contract, invoice, payment, and revenue workflows are well covered with lifecycle operations. However, several supporting domains are create/get-only, such as plans, product pricing, tax categories, custom attributes, accounts, and journal entries, leaving notable gaps.