Retrieve Protein Structure
Invocation
Use the exact tool name and parameter schema exposed by the current harness. Tool names in SDK examples below are raw MCP names, not model-facing aliases. Local files must be uploaded with molclaw-file-transfer before a server tool can use them. Repair PDB inputs first when the workflow requires it.
Scene 1: If the gene name is provided, please use tool retrieve_protein_structure_by_gene_name.
The description of tool retrieve_protein_structure_by_gene_name.
texRetrieve and download a protein structure (.pdb or .cif) using a standard gene name. Args: gene_name (str): Input gene name (e.g., 'TP53') organism (str): Required species NCBI Taxonomy ID (use 9606 for human or 10090 for mouse) sort_by (str): Required sorting strategy: 'length' prioritizes sequence coverage; 'resolution' prioritizes structural resolution. Return: status (str): success/error msg (str): message prot_structure_path (str): Path to the downloaded .pdb or .cif structure file
How to use tool retrieve_protein_structure_by_gene_name :
pythonresponse = await client.session.call_tool( "retrieve_protein_structure_by_gene_name", arguments={ "gene_name": gene_name, "organism": "9606", "sort_by": "length" } ) result = client.parse_result(response) prot_structure_path = result["prot_structure_path"]
Scene 2: If the UniProt ID is provided, please use tool retrieve_protein_structure_by_uniprot_id.
The description of tool retrieve_protein_structure_by_uniprot_id.
texRetrieve and download a protein structure (.pdb or .cif) using a UniProt ID. Args: uniprot_id (str): Input uniprot id (e.g., 'P04637') sort_by (str): Required sorting strategy: 'length' prioritizes sequence coverage; 'resolution' prioritizes structural resolution. Return: status (str): success/error msg (str): message prot_structure_path (str): Path to the downloaded .pdb or .cif structure file
How to use tool retrieve_protein_structure_by_uniprot_id :
pythonresponse = await client.session.call_tool( "retrieve_protein_structure_by_uniprot_id", arguments={ "uniprot_id": uniprot_id, "sort_by": "length" } ) result = client.parse_result(response) prot_structure_path = result["prot_structure_path"]
Scene 3: If the PDB ID is provided, please use tool retrieve_protein_structure_by_pdb_id.
The description of tool retrieve_protein_structure_by_pdb_id.
texRetrieve and download a protein structure using a PDB ID. The service tries .pdb first and automatically falls back to .cif when needed. Args: pdb_id (str): Input pdb id (e.g., "2l3r", "5XYF") Return: status (str): success/error msg (str): message prot_structure_path (str): Path to the downloaded .pdb or fallback .cif structure file
How to use tool retrieve_protein_structure_by_pdb_id :
pythonresponse = await client.session.call_tool( "retrieve_protein_structure_by_pdb_id", arguments={ "pdb_id": pdb_id } ) result = client.parse_result(response) prot_structure_path = result["prot_structure_path"]


