ensembl_protein_features
Retrieve detailed protein features, domains, and annotations by specifying a protein ID and feature type, available across multiple species via the Ensembl genomics database.
Instructions
Get protein-level features, domains, and annotations for proteins and translations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| feature_type | No | Type of protein feature (e.g., 'domain', 'signal_peptide', 'transmembrane', 'low_complexity') | |
| protein_id | Yes | Protein/translation ID (e.g., 'ENSP00000288602', 'ENSP00000350283', 'ENSP00000334393') | |
| species | No | Species name (e.g., 'homo_sapiens', 'mus_musculus') | homo_sapiens |
Implementation Reference
- src/utils/ensembl-api.ts:135-154 (handler)Core handler implementation: calls Ensembl REST API /overlap/translation/{protein_id} endpoint with optional feature_type filter. Includes input validation and species checking.async getProteinFeatures(args: any): Promise<any> { const { protein_id, feature_type, species = "homo_sapiens" } = args; if (!protein_id) { throw new Error("protein_id is required"); } // Validate species if provided and not default if (species && species !== "homo_sapiens") { await this.validateSpecies(species); } const params: Record<string, string> = {}; if (feature_type) { params.type = feature_type; } return this.makeRequest(`/overlap/translation/${protein_id}`, params); }
- src/handlers/tools.ts:465-475 (handler)Tool handler wrapper: normalizes inputs and delegates to EnsemblApiClient.getProteinFeatures, with error handling.export async function handleProteinFeatures(args: any) { try { const normalizedArgs = normalizeEnsemblInputs(args); return await ensemblClient.getProteinFeatures(normalizedArgs); } catch (error) { return { error: error instanceof Error ? error.message : "Unknown error", success: false, }; } }
- index.ts:85-97 (registration)MCP server dispatch: switch case that calls handleProteinFeatures for tool execution.case "ensembl_protein_features": return { content: [ { type: "text", text: JSON.stringify( await handleProteinFeatures(args), null, 2 ), }, ], };
- src/handlers/tools.ts:88-113 (schema)Tool schema definition: input validation schema and metadata, included in ensemblTools for MCP list tools.{ name: "ensembl_protein_features", description: "Get protein-level features, domains, and annotations for proteins and translations.", inputSchema: { type: "object", properties: { protein_id: { type: "string", description: "Protein/translation ID (e.g., 'ENSP00000288602', 'ENSP00000350283', 'ENSP00000334393')", }, feature_type: { type: "string", description: "Type of protein feature (e.g., 'domain', 'signal_peptide', 'transmembrane', 'low_complexity')", }, species: { type: "string", description: "Species name (e.g., 'homo_sapiens', 'mus_musculus')", default: "homo_sapiens", }, }, required: ["protein_id"], }, },
- index.ts:47-51 (registration)MCP list tools handler: returns ensemblTools array containing the tool registration.this.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: ensemblTools, }; });