> For the complete documentation index, see [llms.txt](https://docs.biobox.io/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.biobox.io/guide/how-to/ask-biobox-with-claude/tools/list-query-templates.md).

# list\_query\_templates — List the org's query templates

List the org's query templates

List the org's query templates

## What it does

List the organization's reusable query templates (intent→cypher hints): each with a description, plannerNotes (when/how to use it), cypherTemplate, and qlEquivalent (BxQL).

**When to use:** you want to reuse or adapt an established query pattern for a common question; you need the org's plannerNotes / BxQL for a known intent before writing a query from scratch.

**When NOT to use:** you want the org's general query-building rules — use get\_ql\_instructions; you want to fetch one template you already have the uuid for — use get\_query\_template.

**Parameters:**

* `enabledOnly` — optional; when true, return only enabled templates (default: all).

**Returns:** An object { templates, count }. Each template is { uuid, name, description, cypherTemplate, returnStatement, inputVariables, plannerNotes, qlEquivalent, distinct, enabled, allowWriteOperations }. `uuid` is the drill handle for get\_query\_template.

## Parameters

| Parameter     | Type    | Required | Description                                                        |
| ------------- | ------- | -------- | ------------------------------------------------------------------ |
| `enabledOnly` | boolean | no       | optional; when true, return only enabled templates (default: all). |

## Response

```ts
_(identity shaper — response = the handler result; see the tool source.)_
```

## Example

```json
// list_query_templates({})
{}
```

Response (arrays truncated):

```json
{
  "templates": [
    {
      "uuid": "CyNXCGpzkxAd3ni9Qhsm9",
      "name": "protein_protein_interactions",
      "description": "Proteins that interact with a specific anchor protein. Input must be a protein ID, not a gene ID.",
      "cypherTemplate": "MATCH (input:Protein)-[:`has protein association`]->(p2:Protein)",
      "returnStatement": "RETURN p2.uuid as interactingProteinID",
      "inputVariables": [
        {
          "groupingVariable": "inputVar",
          "key": "uuid",
          "variable": "input",
          "name": "proteinID",
          "description": "The UUID of the protein to find associations for",
          "type": "string",
          "required": true,
          "operator": "="
        }
      ],
      "plannerNotes": null,
      "qlEquivalent": "(input:Protein $inputVar)-> has protein association-> (p2:Protein)",
      "distinct": true,
      "enabled": true,
      "allowWriteOperations": false
    },
    {
      "uuid": "xqN6EimO9ecVDlGvDN-bk",
      "name": "gene_protein_protein_interactions",
      "description": "Proteins that interact with the protein encoded by a gene",
      "cypherTemplate": "MATCH (input:Gene)<-[:`encoded by`]-(p:Protein)-[:`has protein association`]->(p2:Protein)",
      "returnStatement": "RETURN p2.uuid as interactingProteinID",
      "inputVariables": [
        {
          "groupingVariable": "geneVar",
          "key": "uuid",
          "variable": "input",
          "name": "geneID",
          "description": "The uuid of the gene associated with the protein you want associations of",
          "type": "string",
          "required": true,
          "operator": "="
        }
      ],
      "plannerNotes": null,
      "qlEquivalent": "(input:Gene $geneVar)<- encoded by<- (p:Protein)-> has protein association-> (p2:Protein)",
      "distinct": true,
      "enabled": true,
      "allowWriteOperations": false
    },
    {
      "uuid": "2pFLryHlH5XpCFjUGjA5p",
      "name": "find_genes_acted_on_by_drugs_approved_for_disease",
      "description": "Find genes that are acted upon by drugs, which are approved for a disease. Query template should be used when wanting genes given the disease uuid",
      "cypherTemplate": "MATCH (g:Gene)<-[:`acts on`]-(d:Drug)-[:`is approved for`]->(input:Disease)",
      "returnStatement": "RETURN d.uuid as resultDiseaseID",
      "inputVariables": [
        {
          "groupingVariable": "diseaseVar",
          "key": "uuid",
          "variable": "input",
          "name": "diseaseID",
          "description": "The uuid of the disease",
          "type": "string",
          "required": true,
          "operator": "="
        }
      ],
      "plannerNotes": null,
      "qlEquivalent": "(g:Gene)<- acts on<- (d:Drug)-> is approved for-> (input:Disease $diseaseVar)",
      "distinct": true,
      "enabled": true,
      "allowWriteOperations": false
    },
    "… 6 more"
  ],
  "count": 9
}
```
