Skip to main content
Glama

export_for_chimerax

Export AlphaFold protein structure data for visualization in ChimeraX. Specify UniProt ID and optionally include confidence score coloring for enhanced analysis.

Instructions

Export structure data formatted for ChimeraX visualization

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeConfidenceNoInclude confidence score coloring (default: true)
uniprotIdYesUniProt accession

Implementation Reference

  • src/index.ts:550-561 (registration)
    Tool registration and schema definition in the list of tools returned by ListToolsRequestSchema.
    { name: 'export_for_chimerax', description: 'Export structure data formatted for ChimeraX visualization', inputSchema: { type: 'object', properties: { uniprotId: { type: 'string', description: 'UniProt accession' }, includeConfidence: { type: 'boolean', description: 'Include confidence score coloring (default: true)' }, }, required: ['uniprotId'], }, },
  • src/index.ts:619-620 (registration)
    Tool dispatch/registration in the CallToolRequestSchema switch statement.
    case 'export_for_chimerax': return this.handleExportForChimeraX(args);
  • Input validation function for export tools, including export_for_chimerax.
    const isValidExportArgs = ( args: any ): args is { uniprotId: string; includeConfidence?: boolean } => { return ( typeof args === 'object' && args !== null && typeof args.uniprotId === 'string' && args.uniprotId.length > 0 && (args.includeConfidence === undefined || typeof args.includeConfidence === 'boolean') ); };
  • The core handler function implementing the export_for_chimerax tool logic, which fetches the structure and generates a ChimeraX visualization script.
    private async handleExportForChimeraX(args: any) { if (!isValidExportArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid ChimeraX export arguments'); } try { const response = await this.apiClient.get(`/prediction/${args.uniprotId}`); const structures = response.data; if (!structures || structures.length === 0) { return { content: [ { type: 'text', text: `No structure available for ${args.uniprotId}`, }, ], }; } const structure = structures[0]; const includeConfidence = args.includeConfidence !== false; const chimeraScript = ` # ChimeraX script for AlphaFold structure ${args.uniprotId} open ${structure.pdbUrl} cartoon color bychain ${includeConfidence ? ` # Color by confidence scores # This would require the confidence data to be loaded ` : ''} view `; return { content: [ { type: 'text', text: JSON.stringify({ uniprotId: args.uniprotId, chimeraScript, structureUrl: structure.pdbUrl, instructions: 'Open ChimeraX and run the commands above', }, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error exporting for ChimeraX: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; }

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/Augmented-Nature/AlphaFold-MCP-Server'

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