Skip to main content
Glama

query_connectivity

Query synaptic connectivity between Drosophila neuron classes across ALL connectome datasets simultaneously for comparative connectomics. This is NOT pre-cached — it runs live queries, so expect slow responses (up to several minutes). Set both upstream_type AND downstream_type to filter connections between two specific neuron classes (e.g., "What Tm1→T3 connections exist across all datasets?"). At least one of upstream_type or downstream_type is required. CONSTRAINTS: Only accepts neuron class terms (OWL IDs like FBbt_00003789 or labels like "transmedullary neuron Tm1") — anatomical regions or neuropils (e.g., "lobula", "medulla") are NOT accepted. NOT suitable for individual neuron-to-neuron connections — for pre-computed connections of a single individual neuron, use run_query with NeuronNeuronConnectivityQuery instead. NOT for muscle/sense organ connections. RECOMMENDED DEFAULTS: weight=5, exclude_dbs=["hb","fafb"] unless user specifies otherwise. For both-ends queries, start with weight≥50 to avoid timeouts. RESULT SIZE: a broad query is enormous (a single class at weight=5 can be over 50,000 connections), so results are ranked strongest-first and paged — you get limit rows (default 50) plus a summary computed over ALL of them: totals, per-dataset counts, distinct neuron counts, and the top class pairs. Answer from the summary and quote a handful of rows; only page with offset if the user asks for specific further rows. WORKFLOW: Confirm parameters with user before querying. Use search_terms with filter_types ["neuron","class"] to validate/canonicalize neuron type labels. If zero results, try relaxation: lower weight to 1, then remove exclude_dbs filter, then try group_by_class=true — report what worked and let user decide. group_by_class=true is usually the better first call on a broad query: it aggregates to class pairs instead of returning every neuron pair.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoHow many connection rows to return, strongest first (default 50). The summary always covers every connection found, not just the returned rows. Pass 0 for all rows — only do this on a query you already know is small, as broad queries return tens of thousands.
offsetNoRow to start from within the strongest-first ranking (default 0). Re-running with the same limit and the next offset walks down the list.
weightNoMinimum synapse count threshold (recommended default: 5). Lower to 1 if initial query returns zero results as first relaxation step.
exclude_dbsNoDataset symbols to exclude (recommended default: ["hb", "fafb"] to focus on newer datasets). Pass empty array [] to include all datasets. Must be the exact `symbol` field from list_connectome_datasets — currently BANC, fw, ol, mv, hb, mc, fafb, l1em. An unrecognised symbol is silently ignored by the server rather than reported, so a dataset name ("hemibrain", "male-cns", "flywire") excludes nothing and gives no warning. Call list_connectome_datasets rather than guessing.
upstream_typeNoUpstream (presynaptic) neuron class — OWL ID (e.g., "FBbt_00003789") or full label (e.g., "transmedullary neuron Tm1"). Must be a neuron type/class, NOT an anatomical region. Use search_terms with filter_types ["neuron","class"] to validate/canonicalize labels before querying.
group_by_classNoIf true, aggregate results by neuron class — returns total_weight, average_weight, percent_connected per class pair, ranked by pairwise_connections. If false (default), returns individual neuron-to-neuron rows.
downstream_typeNoDownstream (postsynaptic) neuron class — OWL ID or full label. Must be a neuron type/class, NOT an anatomical region. If user asks about connectivity to a brain region, first find neuron classes in that region using search_terms, then query for those classes.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed3 schema fields changed
    • changedInput schema / properties / exclude_dbs / description
      Previous value: -"Dataset symbols to exclude (recommended default: [\"hb\", \"fafb\"] to focus on newer datasets). Pass empty array [] to include all datasets. Use list_connectome_datasets to see valid symbols."New value: +"Dataset symbols to exclude (recommended default: [\"hb\", \"fafb\"] to focus on newer datasets). Pass empty array [] to include all datasets. Must be the exact `symbol` field from list_connectome_datasets — currently BANC, fw, ol, mv, hb, mc, fafb, l1em. An unrecognised symbol is silently ignored by the server rather than reported, so a dataset name (\"hemibrain\", \"male-cns\", \"flywire\") excludes nothing and gives no warning. Call list_connectome_datasets rather than guessing."
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 50,
      +  "description": "How many connection rows to return, strongest first (default 50). The summary always covers every connection found, not just the returned rows. Pass 0 for all rows — only do this on a query you already know is small, as broad queries return tens of thousands.",
      +  "type": "number"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Row to start from within the strongest-first ranking (default 0). Re-running with the same limit and the next offset walks down the list.",
      +  "type": "number"
      +}
  2. Added

TDQS

A5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses that queries are NOT pre-cached and can take minutes, that broad queries can return over 50,000 connections, that results are ranked and paged, and that unrecognized dataset symbols are silently ignored. It also explains the summary's contents and advises on paging. This gives the agent critical expectations not derivable from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Though long, the description is densely informative and well-structured. It front-loads the purpose, then uses clear CONSTRAINTS, RECOMMENDED DEFAULTS, RESULT SIZE, and WORKFLOW sections. Every sentence adds unique value (e.g., result size caveat, paging behavior, relaxation sequence) and there is no redundant filler. The length is justified by the tool's complexity and the absence of annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter query tool with no output schema, this description is exceptionally complete. It covers purpose, exclusions, parameter interplay, result expectations, paging semantics, dataset symbol validation, and relaxation troubleshooting. It even explains what the summary contains and advises 'Answer from the summary and quote a handful of rows.' No significant contextual gaps remain for an agent to select and invoke this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds substantial meaning beyond the schema: 'Set both upstream_type AND downstream_type to filter connections between two specific neuron classes,' 'At least one of upstream_type or downstream_type is required,' recommended defaults (weight=5, exclude_dbs=["hb","fafb"]), and guidance to use weight≥50 for both-ends queries to avoid timeouts. It also clarifies the practical effect of group_by_class, enriching the agent's parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource+scope: 'Query synaptic connectivity between Drosophila neuron classes across ALL connectome datasets simultaneously.' It clearly differentiates from sibling tools by explicitly stating it is NOT for single-neuron connections (use run_query) and NOT for muscle/sense organ connections. This makes the tool's purpose unambiguous and distinct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use and when-not-to-use guidance, naming alternatives: 'use run_query with NeuronNeuronConnectivityQuery instead' for individual neurons, and 'use search_terms... to validate/canonicalize neuron type labels.' It also gives a full workflow (confirm with user, validate terms, relaxation steps) and specific recommendations for broad queries. This far exceeds the minimum and gives an agent clear decision rules.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool targets a distinct operation: searching vs. metadata retrieval vs. pre-computed queries vs. live connectivity vs. ID resolution vs. listing datasets/facets. The descriptions explicitly clarify differences between similar tools like query_connectivity and run_query, and resolve_entity vs. resolve_combination.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern (get_hierarchy, list_connectome_datasets, query_connectivity, resolve_entity, run_query, search_terms). No mixing of styles or vague verbs.

Tool Count5/5

9 tools is well-scoped for a specialized domain server. Each tool covers a necessary capability without redundancy or bloat, fitting comfortably within the ideal 3-15 range.

Completeness5/5

The tool set comprehensively covers the VFB domain: search, metadata, hierarchy, pre-computed queries, live cross-dataset connectivity, ID resolution, and listing of datasets and facets. Obvious gaps like direct image retrieval are handled via get_term_info, and publication queries are available through run_query.