Skip to main content
Glama

Take ontology work items

get_ontology_work

Take ready ontology work items for this datasource; items a person answered come first. When none are ready and server measurements are in flight it waits up to wait_seconds, then returns with status. timed_out is true only when that wait spent its budget and the batch carries no items. An empty batch with timed_out false means either the wait ended early on a change or no wait was needed: call again only when status shows server.pending, server.running or agent.ready above zero. Each item carries facts and closes_with; section_instructions holds each section's guidance once. Column facts and staged values are shared by the batch: the column_facts and staged_values entries an item reads are named by its facts (its columns and its candidates' source and target), each key a "<schema.table.column>" name or, for a column path that already contains a dot, that path as written; an entry of an item's facts.columns is that key, or the column's own facts object inline when this item's copy differs, and staged_values (measured values, when you are entitled to them) is keyed by the same names. A name two different columns would share is published under neither map: those items keep their facts inline and no values are sent under that name. Apply the answer, then resolve_ontology_question. requested_item_ids names items returned by request_ontology_work: their stored outcome is reported in requested_items as soon as it completes, and an answered value-reading item carries the staged values you are entitled to. Only the caller that asked for an item can read it back, and requested_items are always reported in full: the byte budget trims the work batch's items, never the read-back. The work batch's JSON is held to 40,000 bytes so MCP clients can read it: when the ready items would not fit, it returns the first items that do (always at least one, even if oversized) and counts the rest in deferred_items. Deferred items are returned to the queue at once; call again to take them. deferred_until_expiry counts the deferred items the queue did not hand back (its release failed, or a person resolved that item meanwhile or another session holds its lease now), so those are not claimable again until their leases expire or that outcome stands. A setup-change notice may follow as a separate text block.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "datasource": "<datasource>"
    },
    "name": "get_ontology_work"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum items this call (1-25, default 5); fewer are returned when more would not fit the response budget
datasourceYesDatasource UUID to take work for
wait_secondsNoSeconds to wait for work when none is ready and the server is still measuring (0-60, default 30)
requested_item_idsNoOptional request_ontology_work item UUIDs to report the outcome of, including staged values for an answered value-reading item when entitled

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only say this is a non-read-only, non-idempotent, non-destructive mutation; the description adds far more. It discloses lease acquisition and expiry (deferred_until_expiry), that deferred items are released back to the queue immediately, a 40,000-byte response budget with 'always at least one, even if oversized' semantics, caller-only read-back isolation, and the possibility of a trailing setup-change text block. These are exactly the operational traits an agent cannot get from the annotations.

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

Conciseness3/5

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

Purpose and retry rules are front-loaded, but the middle is a dense, unbroken block covering column_facts/staged_values key derivation, ambiguous-name suppression, byte budgeting, and deferral accounting in single run-on sentences. Every sentence is substantive, but the absence of structure makes it hard to scan and the naming rules in particular require re-reading.

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?

With no output schema and a genuinely complex claiming/leasing protocol, the description carries the whole burden and does so: it enumerates returned fields (items, facts, closes_with, section_instructions, column_facts, staged_values, deferred_items, deferred_until_expiry, requested_items, status) and explains how each behaves. An agent has enough to call this correctly and interpret the result without external documentation.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: limit interacts with the response budget ('fewer are returned when more would not fit'), wait_seconds is tied to the precise timed_out condition, and requested_item_ids carries an ownership rule plus guaranteed full reporting. Only the datasource parameter is left entirely to the schema.

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

Purpose4/5

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

The first clause names a specific verb and resource with scope: 'Take ready ontology work items for this datasource; items a person answered come first.' It also distinguishes itself from request_ontology_work by explaining that requested_item_ids refers to items returned by that other tool. It stops short of a clean one-line differentiator against prioritize/retry/skip siblings, but the operation and its ordering rule are unmistakable.

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

Usage Guidelines4/5

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

Retry behavior is stated explicitly and conditionally: 'call again only when status shows server.pending, server.running or agent.ready above zero,' plus a note that deferred items are re-queued so you 'call again to take them.' It also routes the agent forward: 'Apply the answer, then resolve_ontology_question.' What it lacks is an explicit negative case (e.g. when to prefer request_ontology_work or retry_ontology_work instead), so it is strong but not fully closed.

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.

Resources