Skip to main content
Glama

Get Gene Alteration Frequency

get_gene_alteration_frequency
Read-only

Calculate how often a gene is mutated or copy-number altered across cBioPortal studies, optionally by protein change, with profiled denominators and per-study licence details.

Instructions

Get how often a gene is altered per cBioPortal study: mutation (altered / profiled samples, panel-aware), optional protein_change (e.g. KRAS G12C) and CNA (amplified / deep-deleted / profiled), each row with licence, citation and import_date. Pick studies by cancer_type (OncoTree code, subtypes included, largest first, max_studies; total/truncated count matching studies) or study_ids; neither = MSK-IMPACT 2017 pan-cancer. Never sum rows (cohorts overlap). Restricted (NC/ND) studies are skipped unless include_restricted. Signature: get_gene_alteration_frequency(gene, cancer_type=, study_ids=, protein_change=, include_restricted=, max_studies=).

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": {
      "gene": "<gene>"
    },
    "name": "get_gene_alteration_frequency"
  }
}

Input Schema

NameRequiredDescriptionDefault
geneYesGene symbol (HGNC, e.g. BRAF) or NCBI Gene ID (673 or NCBIGene:673).
study_idsNoExplicit study IDs (1-10); instead of cancer_type.
cancer_typeNoLowercase OncoTree code as cBioPortal uses it (luad, skcm, mel); subtypes are included. Find codes with list_cancer_types.
max_studiesNoWith cancer_type: studies to query (default 3).
protein_changeNoOne-letter protein change, e.g. V600E or G12C (p. prefix optional).
include_restrictedNoOpt in to studies with non-commercial/no-derivatives terms (flagged).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnly and openWorld, and the description adds substantial behavior on top: panel-aware denominators, subtype inclusion, largest-studies-first ordering with total/truncated counts, per-row licence/citation/import_date, and the restricted-study skip with opt-in. The cohort-overlap warning is exactly the kind of non-obvious trait an agent needs.

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?

Purpose is front-loaded before the study-selection and caveat clauses, and every sentence carries operational content. The trailing signature line duplicates the schema and the parentheticals make the prose dense, which costs a point.

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?

With six parameters and no output schema, the description carries the return-value burden and mostly meets it: it names the per-row metadata (licence, citation, import_date) and the altered/profiled framing. It stops short of enumerating the full row shape, so an agent still learns the structure partly by calling.

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, but the description adds meaning the schema lacks: cancer_type results are ordered largest first with a total/truncated matching count, and max_studies governs how many of those are actually queried. protein_change and include_restricted are largely restatements of the schema text.

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 and resource — frequency of gene alterations per cBioPortal study — and immediately decomposes it into mutation (altered/profiled, panel-aware), optional protein_change, and CNA (amplified/deep-deleted) counts. This is far more precise than the siblings' names imply and lets an agent distinguish this aggregate-frequency tool from get_gene_mutations or get_mutation_position_counts.

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?

Gives concrete selection rules: pick studies by cancer_type or study_ids, and when neither is supplied it defaults to MSK-IMPACT 2017 pan-cancer. It also warns 'Never sum rows (cohorts overlap)' and that restricted studies are skipped unless include_restricted. It does not explicitly contrast itself with the sibling mutation tools, so it falls short of a 5.

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