Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions LLM_GUIDANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,8 @@ After showing the text tree, offer the user an interactive HTML version they can
https://v3-cached.virtualflybrain.org/get_hierarchy_html?id=<ID>&relationship=<RELATIONSHIP>&direction=<DIRECTION>&max_depth=<DEPTH>
```

The `get_hierarchy` tool itself omits that HTML by default — it is a second copy of the tree you already have in `descendants`/`ancestors`, and it is usually three quarters of the response. Pass `include_html: true` if you actually intend to render it.

For example: `https://v3-cached.virtualflybrain.org/get_hierarchy_html?id=FBbt_00003686&relationship=subclass_of&direction=both&max_depth=2`

The HTML page has a collapsible interactive tree with clickable links to VFB for every term.
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ docker run -p 3000:3000 virtualflybrain/vfb3-mcp:latest
Retrieve detailed information about VFB terms using their IDs.

**Parameters:**
- `id` (string): VFB ID (e.g., "VFB_jrcv0i43")
- `id` (string or array): One or more VFB IDs (e.g., "VFB_jrcv0i43"); an array is fetched in parallel and returned keyed by ID
- `verbose` (boolean, optional): Return the raw response (default false)

By default the response is trimmed, which roughly halves it. Each `Queries` entry keeps `query`, `label`, `preview_columns` and `output_format`; its argument schema (`takes`) and its `preview_results` block are dropped when that block has no rows, since it otherwise just repeats `preview_columns`. Each image entry keeps `id`, `label` and `thumbnail`; the other five file URLs are dropped, and the response says where they are — same directory as the thumbnail, named `thumbnailT.png`, `volume.nrrd`, `volume.wlz`, `volume_man.obj`, `volume.swc`. Nothing here is a guess about what you need: pass `verbose: true` and you get the untouched response.

### run_query
Execute predefined queries on VFB data.
Expand Down Expand Up @@ -313,6 +316,18 @@ List the valid `facets_annotation` type names for the four type filters above, r

If the deployed VFBquery predates the `/facets` endpoint, this falls back to a snapshot bundled with the server and says so — names absent from a snapshot result may still be valid.

### get_hierarchy
Traverse the ontology hierarchy for a VFB term.

**Parameters:**
- `id` (string): VFB term ID (e.g., "FBbt_00005801")
- `relationship` (string): `part_of` for region/tissue structure, `subclass_of` for cell-type taxonomy
- `direction` (string, optional): `descendants`, `ancestors`, or `both` (default `both`)
- `max_depth` (number, optional): Levels to expand (default 1; `-1` for the full tree)
- `include_html` (boolean, optional): Include the HTML rendering (default false)

The endpoint returns the tree three times over: as data in `descendants`/`ancestors`, as a `display` string, and as an `html` document written for the VFB site's ROI browser — with `display_full` usually byte-identical to `display`. By default the `html` is omitted and `display_full` is dropped when it duplicates `display`, which takes a typical response from ~4.3 KB to ~1.4 KB. Pass `include_html: true` if you are embedding the site rendering.

### query_connectivity
Query synaptic connectivity between neuron classes across all connectome datasets. At least one of `upstream_type` or `downstream_type` is required. Results are ranked strongest-first and paged: you get `limit` rows plus a `summary` computed over **every** connection found — weight min/max/total/mean, per-dataset counts, distinct neuron counts, and the top class pairs — so the totals stay true even though the rows are truncated. A broad query can find tens of thousands of connections, which is why paging is on by default.

Expand Down
6 changes: 3 additions & 3 deletions TECHNICAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ it: one ranking, one place to fix it.
### MCP Tools Implementation

#### get_term_info
- **Input**: VFB ID string
- **Output**: Term metadata, classifications, images, publications
- **API Call**: POST to term info endpoint
- **Input**: VFB ID string or array of IDs; optional `verbose`
- **Output**: Term metadata, classifications, images, publications. Trimmed by default (empty query previews, query argument schemas and the non-thumbnail image file URLs are removed, and a `trimmed` field says what went and how to get it back) — about half the bytes. `verbose: true` returns the response untouched
- **API Call**: GET `get_term_info`

#### run_query
- **Input**: VFB ID(s) and query type; optional `limit`/`offset` (paging) and `include_images`
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "vfb3-mcp",
"version": "1.10.0",
"version": "1.11.0",
"description": "MCP server for VirtualFlyBrain API integration",
"main": "index.js",
"scripts": {
"build": "tsc",
"start": "node dist/index.js",
"dev": "tsc && node dist/index.js"
"dev": "tsc && node dist/index.js",
"test:live": "node test/live-smoke.js"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion server.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "org.virtualflybrain/vfb3-mcp",
"title": "VirtualFlyBrain",
"description": "MCP server for Drosophila neuroscience data from VirtualFlyBrain",
"version": "1.10.0",
"version": "1.11.0",
"websiteUrl": "https://virtualflybrain.org",
"repository": {
"url": "https://github.com/Robbie1977/VFB3-MCP",
Expand Down
Loading
Loading