Generate billing report
Skill synology-apm/apm-sdk-python/skills/generate-billing-report
Compute backup charges per plan, server, workload type, or tenant from protected data volume. Use when the user asks for a billing or chargeback report.From its SKILL.md
npx -y skills add synology-apm/apm-sdk-python --skill generate-billing-reportAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.3 KB, as published. Nobody here has run it
Generate Billing Report
When the user asks to compute backup charges per workload group, server, or protection plan:
See apm-mcp-conventions for shared conventions this skill relies on (list vs. get field completeness, pagination, permission modes).
-
Call
list_machine_workloads(limit=500), withis_retired=truein a second pass to also capture retired (e.g. Retirement-Plan-billed) workloads. Calllist_saas_tenantsfirst to enumerate tenants, then calllist_m365_workloadsonce per (tenant,workload_type) pair — it takes a singleworkload_typeand has no "all types" option, so cover all six types (exchange, onedrive, chat, sharepoint, teams, group) per tenant, each with bothis_retired=falseandis_retired=true. Every one of these calls returns{items, total}— iftotalexceeds the returned item count, keep paging withoffsetuntil you've collected everything (seeapm-mcp-conventions); a charge computed from a partial page silently undercounts. -
Group workloads by the dimension the user requests:
- By plan: group on
plan.name - By server: group on
backup_server.name - By type: group on
workload_type(vm, pc, exchange, ...) - By tenant: group on
tenant_id(M365 only)
- By plan: group on
-
For each group, sum
protected_data_bytes(total protected data under management) — this is the only field the charge in step 4 is based on.backup_copy_data_bytes(data in a configured Backup Copy destination) is informational only; report it separately if the user wants visibility into secondary-copy storage, but don't fold it into the charge. -
If the user provides a per-GB rate (e.g., "$0.05/GB/month"), compute the cost:
charge = protected_data_bytes / 1024**3 * rate(binary GB/GiB, matching the referenceexamples/billing_report.pytool's convention)
-
Present:
- Summary table: group name | workload count | protected data (GB) | estimated charge
- Sort by protected data descending
- Include a totals row
-
Note: this skill computes estimates — actual billing depends on your organization's pricing model.