Skip to main content
Glama

Compare Entities

compare_entities
Read-onlyIdempotent

"Compare X and Y" / "X vs Y" / "X versus Y" / "which is bigger / better / larger / more profitable" / "rank these companies" / "head to head", side-by-side comparison of 2-5 companies or drugs in ONE parallel call. ALWAYS PREFER over sequential single-pack lookups when comparing entities. type="company" pulls LATEST 10-K revenue + operating income + net income + cash + long-term debt from SEC EDGAR/XBRL (off-calendar fiscal years handled correctly, AAPL Sep, NVDA Jan, etc.). type="drug" pulls FAERS adverse-event counts, FDA approval counts, active trial counts. Results sorted by primary metric so "largest" / "most" / "biggest" reads off the top of the response. Returns paired data + pipeworx:// citation URIs per entity. Replaces 8-15 sequential lookups.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "type": "<type>",
      "values": "<values>"
    },
    "name": "compare_entities"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesEntity type: "company" or "drug".
valuesYesFor company: 2-5 tickers/CIKs (e.g., ["AAPL","MSFT"]). For drug: 2-5 names (e.g., ["ozempic","mounjaro"]).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / examples
      Removed value: -[
      -  {
      -    "type": "company",
      -    "values": [
      -      "AAPL",
      -      "MSFT"
      -    ]
      -  }
      -]
  2. Changed1 schema field changed
    • changedInput schema / properties / values / description
      Previous value: -"For company: 2–5 tickers/CIKs (e.g., [\"AAPL\",\"MSFT\"]). For drug: 2–5 names (e.g., [\"ozempic\",\"mounjaro\"])."New value: +"For company: 2-5 tickers/CIKs (e.g., [\"AAPL\",\"MSFT\"]). For drug: 2-5 names (e.g., [\"ozempic\",\"mounjaro\"])."
  3. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "type": "company",
      +    "values": [
      +      "AAPL",
      +      "MSFT"
      +    ]
      +  }
      +]
  4. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, so the safety profile is covered. The description adds real behavior beyond that: upstream sources (SEC EDGAR/XBRL, FAERS, FDA), off-calendar fiscal-year handling, sorting by primary metric, and the return shape (paired data + pipeworx:// citation URIs). It does not discuss failure modes (missing ticker, unknown drug) or rate limits, keeping it off a 5.

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-loaded with trigger phrases and the parallel-call differentiator; each sentence covers distinct ground (sources, sorting, output). Slightly dense with repeated emphasis ('ALWAYS PREFER' plus 'Replaces 8-15 sequential lookups') that restates the same value proposition.

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?

With no output schema, the description still discloses the return contract (paired data + citation URIs, sorted by primary metric) and the data provenance per type. For a 2-parameter comparison tool, an agent has everything needed to call it correctly and interpret the response.

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 description coverage is 100%, so baseline is 3. The description still adds meaning: it explains what each type value actually retrieves and confirms the sorting semantics that map to the 'largest/most' intent, which is not derivable from the enum alone.

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?

Specific verb+resource: 'side-by-side comparison of 2-5 companies or drugs in ONE parallel call', with the exact data pulled per type (10-K revenue/operating income/net income/cash/debt vs FAERS adverse events, FDA approvals, trial counts). It clearly separates itself from single-entity lookups and the other *_compare siblings by naming its entity scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use triggers are enumerated ('X vs Y', 'which is bigger', 'rank these companies', 'head to head') and it states a positive routing rule: 'ALWAYS PREFER over sequential single-pack lookups when comparing entities', plus the cost note 'Replaces 8-15 sequential lookups'. That is when-to-use plus the alternative it displaces.

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.