Skip to main content
Glama

Get Project Profitability

get_project_profitability
Read-onlyIdempotent

Per-project profitability, on the same margin definition as the app's profitability report: revenue billed to the project in the company currency against the cost of the time logged to it. Returns margin and margin percentage per project, sorted by margin descending. Past 100 projects it returns the 50 highest and 50 lowest margins (projectsShown, projectsTotal); companyTotals always cover every project, and projectId reads any one. Lifetime by default; give from and to for a period (invoices by issue date, time by work date). Answers questions like "which projects are profitable?", "which projects are losing money?", "what were our margins last quarter?", or "what is project profit and loss?".

Input Schema

NameRequiredDescriptionDefault
toNoLast day of the period, YYYY-MM-DD, inclusive.
fromNoFirst day of the period, YYYY-MM-DD.
projectIdNoOptional: filter to a single project by ID

Output Schema

NameRequiredDescriptionDefault
periodNoThe window read, when one was given
projectsNo
companyTotalsNo
projectsShownNoRows returned, when the list was cut to the highest and lowest margins
projectsTotalNoProjects the totals cover, when the list was cut

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / projectsShown
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Rows returned, when the list was cut to the highest and lowest margins"
      +}
    • addedOutput schema / properties / projectsTotal
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Projects the totals cover, when the list was cut"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With readOnly/idempotent already declared by annotations, the description still adds substantial behavior: output sorted by margin descending, truncation to 50 highest plus 50 lowest past 100 projects, companyTotals covering every project, and date attribution rules (invoices by issue date, time by work date). None of this is recoverable from annotations or schema.

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?

Front-loads the definition and result shape, then pagination, then date scoping, then example queries. Dense and mostly waste-free; the trailing question list is slightly redundant but serves retrieval matching.

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?

An output schema exists, yet the description still covers the sorting, the truncation contract, the totals scope, and the default time range — everything an agent needs to interpret results and choose parameters correctly. No material gap remains.

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 coverage is 100%, so the baseline is 3; the description earns more by explaining what from/to actually mean semantically (invoices attributed by issue date, time by work date) and by noting projectId reads any single project even when the list is truncated. It doesn't restate the date formats, which is appropriate given the schema already does.

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?

States a specific verb+resource (per-project profitability) and pins the exact margin definition used: revenue billed in company currency against cost of time logged. That precision separates it cleanly from siblings like get_utilization_report and list_projects.

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?

Explicitly says lifetime is the default and that from/to switch to a period, and lists concrete question shapes ('which projects are profitable', 'margins last quarter') that route an agent here. It stops short of naming a sibling tool or stating when to prefer a different report instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources