Skip to main content
Glama
pickleton89

cBioPortal MCP Server

by pickleton89

get_sample_list_id

Retrieve detailed sample list information for a specific cancer genomics study to access curated patient sample data for analysis.

Instructions

Get sample list information for a specific study and sample list ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
study_idYes
sample_list_idYes

Implementation Reference

  • Core handler implementing the tool logic: makes an API request to retrieve sample list details for the specified study_id and sample_list_id.
    @handle_api_errors("get sample list id")
    async def get_sample_list_id(self, study_id: str, sample_list_id: str) -> Dict:
        """
        Get sample list information for a specific study and sample list ID.
    
        Args:
            study_id: The ID of the cancer study
            sample_list_id: The ID of the sample list
    
        Returns:
            Dictionary containing sample list information
        """
        return await self.api_client.make_api_request(
            f"studies/{study_id}/sample_lists/{sample_list_id}"
        )
  • Registers all MCP tools, including 'get_sample_list_id', by adding the corresponding server methods to FastMCP.
    def _register_tools(self):
        """Register tool methods as MCP tools."""
        # List of methods to register as tools (explicitly defined)
        tool_methods = [
            # Pagination utilities
            "paginate_results",
            "collect_all_results",
            # Studies endpoints
            "get_cancer_studies",
            "get_cancer_types",
            "search_studies",
            "get_study_details",
            "get_multiple_studies",
            # Genes endpoints
            "search_genes",
            "get_genes",
            "get_multiple_genes",
            "get_mutations_in_gene",
            # Samples endpoints
            "get_samples_in_study",
            "get_sample_list_id",
            # Molecular profiles endpoints
            "get_molecular_profiles",
            "get_clinical_data",
            "get_gene_panels_for_study",
            "get_gene_panel_details",
        ]
    
        for method_name in tool_methods:
            if hasattr(self, method_name):
                method = getattr(self, method_name)
                self.mcp.add_tool(method)
                logger.debug(f"Registered tool: {method_name}")
            else:
                logger.warning(f"Method {method_name} not found for tool registration")
  • Delegating handler on the main server class that is directly registered as the MCP tool and forwards the call to the SamplesEndpoints instance.
    async def get_sample_list_id(self, study_id: str, sample_list_id: str) -> Dict:
        """Get sample list information for a specific study and sample list ID."""
        return await self.samples.get_sample_list_id(study_id, sample_list_id)
  • Instantiation of the SamplesEndpoints class, which contains the primary implementation, injected with the API client.
    self.samples = SamplesEndpoints(self.api_client)
    self.molecular_profiles = MolecularProfilesEndpoints(self.api_client)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It implies a read operation ('Get') but doesn't disclose behavioral traits like authentication needs, rate limits, error conditions, or what 'information' includes. This is inadequate for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and appropriately sized for the tool's apparent simplicity.

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

Completeness2/5

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

Given no annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't explain what 'sample list information' entails, return format, or error handling, leaving significant gaps for agent usage.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions 'study_id' and 'sample_list_id' but doesn't add meaning beyond what the schema titles provide—no format, constraints, or examples. This fails to address the coverage gap.

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?

The description clearly states the verb 'Get' and the resource 'sample list information', specifying it's for a specific study and sample list ID. It distinguishes from siblings like 'get_samples_in_study' or 'get_study_details' by focusing on sample lists, but doesn't explicitly differentiate beyond the resource name.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name and parameters alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pickleton89/cbioportal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server