Cod Crystal Tools#

Configuration File: cod_crystal_tools.json Tool Type: Local Tools Count: 2

This page contains all tools defined in the cod_crystal_tools.json configuration file.

Available Tools#

COD_get_structure (Type: CODTool)#

Get the complete source record for one seven-digit Crystallography Open Database entry ID. Valida…

COD_get_structure tool specification

Tool Information:

  • Name: COD_get_structure

  • Type: CODTool

  • Description: Get the complete source record for one seven-digit Crystallography Open Database entry ID. Validates that the returned file ID matches the request and reports missing IDs explicitly. Returns all upstream crystallographic and publication fields, including unit cell, space group, formula, names, Z, R factors, DOI, journal, authors, method and radiation.

Parameters:

  • cod_id (string) (optional) Alias for ‘id’. COD structure entry ID (numeric string). Examples: ‘9008460’ (Aluminum), ‘1011240’ (Hematite Fe2O3), ‘5900000’ (Methane), ‘1515581’ (Aspirin)

  • id (string) (optional) COD structure entry ID (numeric string). Examples: ‘9008460’ (Aluminum), ‘1011240’ (Hematite Fe2O3), ‘5900000’ (Methane), ‘1515581’ (Aspirin)

Example Usage:

query = {
    "name": "COD_get_structure",
    "arguments": {
    }
}
result = tu.run(query)

COD_search_structures (Type: CODTool)#

Search the Crystallography Open Database (COD) by chemical formula, elements, space group, minera…

COD_search_structures tool specification

Tool Information:

  • Name: COD_search_structures

  • Type: CODTool

  • Description: Search the Crystallography Open Database (COD) by chemical formula, elements, space group, mineral name, or compound name with recoverable client-side offset pagination. COD’s public JSON endpoint ignores limit/results/offset/page, so this tool fetches the exact upstream set and exposes metadata.total_results, has_more and next_offset; continue until has_more is false. At least one search filter is required. Full upstream records are preserved.

Parameters:

  • query ([‘string’, ‘null’]) (optional) Alias for ‘text’. Free text search across titles, keywords, and compound names. Examples: ‘aspirin’, ‘perovskite’, ‘diamond’

  • text ([‘string’, ‘null’]) (optional) Free text search across titles, keywords, and compound names. Examples: ‘aspirin’, ‘perovskite’, ‘diamond’, ‘zeolite’, ‘ice’

  • formula ([‘string’, ‘null’]) (optional) Chemical formula to search (use spaces between elements). Examples: ‘Fe2 O3’, ‘Si O2’, ‘Na Cl’, ‘C H4’. Exact formula matching.

  • el1 ([‘string’, ‘null’]) (optional) First required element (chemical symbol). Examples: ‘Cu’, ‘Fe’, ‘Si’, ‘C’, ‘N’

  • el2 ([‘string’, ‘null’]) (optional) Second required element (chemical symbol)

  • el3 ([‘string’, ‘null’]) (optional) Third required element (chemical symbol)

  • nel ([‘string’, ‘null’]) (optional) Number of distinct elements in formula (e.g., ‘2’ for binary compounds, ‘3’ for ternary)

  • commonname ([‘string’, ‘null’]) (optional) Common/trivial compound name (partial, case-insensitive), applied client-side to each row’s ‘commonname’ field after a free-text search. Examples: ‘aspirin’, ‘perovskite’, ‘zeolite’, ‘diamond’

  • mineral ([‘string’, ‘null’]) (optional) Mineral name (partial, case-insensitive). COD’s server has no working mineral filter, so this runs a free-text search and keeps rows whose own ‘mineral’ field contains the value. Examples: ‘calcite’, ‘pyrite’, ‘quartz’

  • spacegroup ([‘string’, ‘null’]) (optional) Alias for ‘sg’. Space group symbol (Hermann-Mauguin notation). Examples: ‘P 21/c’, ‘Fm -3 m’, ‘P 1’

  • sg ([‘string’, ‘null’]) (optional) Space group symbol (Hermann-Mauguin notation). Examples: ‘P 21/c’, ‘Fm -3 m’, ‘P 1’

  • sgNumber ([‘string’, ‘null’]) (optional) Space group number (1-230). Examples: ‘225’ (Fm-3m, FCC metals), ‘62’ (Pnma, common for perovskites)

  • max_results ([‘integer’, ‘null’]) (optional) Alias for limit. Page size from 1 to 500; default 100.

  • results ([‘integer’, ‘null’]) (optional) Legacy alias for limit. Page size from 1 to 500; default 100.

  • limit (integer) (optional) Client-side page size, 1-500 (default 100). Server-side default is 100. Left undeclared as a schema default so it cannot collide with the max_results/results aliases.

  • offset (integer) (optional) Zero-based client-side offset. Continue with metadata.next_offset while metadata.has_more is true.

Example Usage:

query = {
    "name": "COD_search_structures",
    "arguments": {
    }
}
result = tu.run(query)