Skip to main content
Glama

ebay_get_order_earnings

Read-only

Retrieve order-level earnings from eBay Finances API, including gross amount, fees, shipping labels, refunds, and net earnings, with date-range filtering and pagination.

Instructions

Get order-level earnings from the eBay Finances API: gross amount, expenses (fees, shipping labels, donations), refunds, and net earnings per order. Filter by orderCreationDate range (defaults to the past year), page with limit/offset, sort by orderCreationDate. Requires the optional https://api.ebay.com/oauth/api_scope/sell.finances.earnings.read scope, which is not requested by default: add it to EBAY_OAUTH_SCOPES and re-run OAuth consent. eBay grants it only to approved US, CN, or HK sellers with USD payouts. eBay requires Digital Signatures on Finances API calls for EU/UK sellers; set EBAY_SIGNING_KEY_JWE and EBAY_SIGNING_PRIVATE_KEY to sign them.

Input Schema

NameRequiredDescriptionDefault
sortNoSort field; only orderCreationDate is supported. eBay sorts ascending by orderCreationDate by default.
limitNoRecords per page, up to 200 (eBay default 20)
filterNoOrder creation date range in UTC; orderCreationDate is the only supported filter, e.g. orderCreationDate:[2024-10-23T00:00:01.000Z..2024-11-09T00:00:01.000Z]. eBay returns the past year when omitted.
offsetNoZero-based number of orders to skip, up to 10,000 (eBay default 0)
marketplaceIdNoOverrides the X-EBAY-C-MARKETPLACE-ID header, e.g. EBAY_US, EBAY_GB or EBAY_DE. Defaults to EBAY_MARKETPLACE_ID; eBay assumes EBAY_US when the header is absent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.18.0

TDQS

A4.1/5.0
Behavior5/5

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

With only readOnlyHint=true declared, the description carries the behavioral load and does so well: it discloses the gated OAuth scope and how to enable it, seller/region eligibility restrictions, and the Digital Signature requirement with the exact env vars needed. These are exactly the failure modes an agent would otherwise hit blindly.

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 purpose and returned fields, then moves through parameters and finally prerequisites, with no wasted sentences. The scope/signature block is dense but every clause is actionable information the agent needs before calling.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a Finances API tool with no output schema and fully self-documented params, the description covers return contents, defaults, and the two real blockers (scope opt-in, signatures). What is missing is sibling routing and any note on combined behavior with the summary/by-id variants.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five parameters are already documented in the schema. The description largely restates them (orderCreationDate filter, year default, limit/offset paging, sort) without adding syntax or caveats beyond what the schema provides, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get order-level earnings from the eBay Finances API') and enumerates exactly what is returned: gross, expenses, refunds, net. It is clear on its own, but it never distinguishes itself from close siblings like ebay_get_order_earnings_by_id or ebay_get_order_earnings_summary, so an agent must infer the boundary.

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?

Provides strong usage context: default date window, paging and sort behavior, plus explicit prerequisites (opt-in scope not requested by default, US/CN/HK seller eligibility with USD payouts, EU/UK signing requirements). It stops short of naming alternative tools for per-order or summary-level earnings.

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

Deploy Server

Other Tools