Recipe: Look up a concept (the right way)

The task

Agents reach for a dictionary tool for everything — including “self-inductance,” “Lenz’s law,” “electromagnetic induction.” A dictionary is for English vocabulary, not technical concepts. This recipe is the decision tree, and the trap in the most common fallback (Wikipedia search on an ambiguous term).

Tools used: define_word, search_wikipedia, get_article_summary, get_concept (OpenAlex), crossref_search_works / openalex_search_works.

Calls: 1-3.

Copy-paste prompt

Define or explain "<term>" using Pipeworx. If it's a common English word, use the dictionary. If
it's a technical or scientific concept, use Wikipedia — but first tell me if the term is
ambiguous (a programming language vs. a place, an acronym with multiple expansions) and, if so,
disambiguate before answering rather than picking the first search hit.

Decision tree

What you’re looking upUse thisWhy
English word, definition or part of speechdefine_wordWhat it’s for. Single English words only.
Named entity, place, person, eventget_article_summaryWikipedia has the encyclopedic article — pass the exact title.
Technical/scientific concept (“Lenz’s law”)search_wikipedia then get_article_summaryEncyclopedia handles physics, math, biology, history.
Academic field of study (“deep learning”)get_conceptReturns concept hierarchy, related fields, citation totals (OpenAlex).
”What papers exist on X?”crossref_search_works or openalex_search_worksScholarly literature search — see collision note below.

Call tool names bare, as shown above — not as pack.tool_name dot-notation. That syntax doesn’t exist on this gateway and errors immediately: live-verified, dictionary.define_word({word: "sanguine"}) returns RPC error: Unknown tool: dictionary.define_word, not a lookup.

What a good answer looks like

define_word({ word: "sanguine" })

returns (live call, 2026-08-06):

{
  "word": "sanguine", "found": true, "phonetic": "/ˈsæŋ.ɡwɪn/",
  "meanings": [
    { "part_of_speech": "noun", "definitions": [ { "definition": "Blood colour; red." } ] },
    { "part_of_speech": "adjective", "definitions": [ { "definition": "..." } ] }
  ]
}

A trustworthy dictionary answer has found: true plus phonetic and per-part-of-speech definitions. A trustworthy Wikipedia answer (get_article_summary) has a description line distinct from the extract — when a term is genuinely ambiguous, Wikipedia is honest about it:

get_article_summary({ title: "Mercury" })
// → description: "Topics referred to by the same term"
//   extract: "Mercury most commonly refers to:\nMercury (planet)...\nMercury (element)...\nMercury (mythology)..."

That’s the good case — the ambiguity is visible in the response. Read on for the case where it isn’t.

A plausible-sounding failure looks like a complete, correctly-cited, entirely legitimate encyclopedia answer — about the wrong sense of the word. This is live, not hypothetical:

search_wikipedia({ query: "Java", limit: 1 })
// → { total_hits: 41599, results: [ { title: "Java",
//     snippet: "Java is one of the Greater Sunda Islands in the South East Asian country of Indonesia...",
//     pageid: 69336 } ] }

get_article_summary({ title: "Java" })
// → { title: "Java", description: "Island and region in Indonesia",
//     extract: "Java is one of the Greater Sunda Islands in the South East Asian country of
//     Indonesia... Java is the world's most populous island, home to approximately 56% of the
//     Indonesian population...", content_urls: {...} }

If the actual question was “what is Java” meaning the programming language, this response is a complete miss dressed as a hit — real title, real facts, real citation, description field present and populated exactly as a correct answer’s would be. Nothing here flags ambiguity, unlike the “Mercury” case above, because “Java” (island) is not a disambiguation stub — it’s a full primary article, and Wikipedia’s own disambiguation page lives at a different title (“Java (disambiguation)”) that search_wikipedia’s top-relevance ranking didn’t surface. Do not chain search_wikipedia({limit: 1}) straight into get_article_summary for a term you know is overloaded (language names, common nouns, acronyms) — check the top 3-5 hits’ snippet fields for topical fit first, or search the disambiguation title directly ("Java (disambiguation)"/"Java (programming language)") when you know which sense you want.

The shapes of failure

define_word({ word: "Lenz" }){found: false, hint: "..."}. Not a crash, but a wasted call — the dictionary doesn’t know about physics. Default to Wikipedia for anything that isn’t pure vocabulary.

get_concept (OpenAlex) can also fail loudly rather than quietly — live-verified, our platform key is currently over its daily OpenAlex budget:

get_concept({ query: "reinforcement learning" })
// → { error: "tool_error", message: "OpenAlex concepts search error: 429 — Insufficient
//     budget. This request costs $0.001 but you only have $0 remaining. Resets at midnight UTC." }

Same for openalex_search_works. When this happens, fall back to crossref_search_works, which is free and unaffected:

crossref_search_works({ query: "reinforcement learning" })
// → { total_results: 2698088, results: [ { doi: "10.5772/5275",
//     title: "Superposition-Inspired Reinforcement Learning and Quantum Reinforcement Learning",
//     authors: ["Chun-Lin Chen", "Dao-Yi Dong"], citations: 6, ... } ] }

search_works collides between the Crossref and OpenAlex packs. The bare name currently auto-routes to OpenAlex via the collision router — call crossref_search_works or openalex_search_works explicitly rather than relying on that.

Worked examples

”What does ‘self-inductance’ mean?”

// Wrong tool for the job:
define_word({ word: "self-inductance" })
// → { found: false, hint: "Word not in dictionary..." }

// Right:
get_article_summary({ title: "Inductance" })
// → { title: "Inductance", description: "Property of electrical conductors",
//     extract: "Inductance is the tendency of an electrical conductor to oppose a change...",
//     content_urls: {...} }

It wants the exact article title — when you don’t have it, run search_wikipedia first and take the top hit’s title, checking the snippet actually matches the sense you meant (see the “Java” failure above).

”What’s the field of ‘reinforcement learning’?”

get_concept({ query: "reinforcement learning" })
// → { display_name: "Reinforcement learning", level: 2,
//     ancestors: [{name: "Machine learning", level: 1}, {name: "Computer science", level: 0}],
//     related_concepts: [{name: "Deep reinforcement learning"}, {name: "Q-learning"}],
//     works_count: <count>, cited_by_count: <count> }

(Subject to the OpenAlex budget caveat above.)

Pattern: try-then-fallback

const dict = await define_word({ word: term })
if (dict.found) return dict

const hits = await search_wikipedia({ query: term, limit: 5 })
// check hits.results[].snippet for topical fit before picking one — don't blindly take [0]
if (hits.results.length) {
  return get_article_summary({ title: hits.results[0].title })
}

return get_concept({ query: term })

But honestly: most agent queries that hit define_word and miss are technical concepts. Just default to Wikipedia first for anything that isn’t a clearly common English word — and check more than the top hit when the term itself is a known overload (language names, acronyms, common nouns used as proper nouns).

Citation pattern

Self-inductance is the property of a circuit that opposes changes in current (Wikipedia). It’s quantitatively related to Lenz’s law and Faraday’s law of induction.

Caveats

  • Call tools by their bare name, not pack.tool dot-notation — the latter errors immediately with “Unknown tool.” See the top of this page.
  • A single-hit Wikipedia search can return a fully-formed answer about the wrong sense of an ambiguous term, with no disambiguation flag, when the top-ranked article happens to be a real primary topic rather than a stub. Check the snippet, or the top few hits, before trusting limit: 1.
  • search_works collides between Crossref and OpenAlex — name the pack explicitly (crossref_search_works / openalex_search_works).
  • OpenAlex tools can run out of daily budget (get_concept, openalex_search_works) — the error is explicit (429, "Insufficient budget"), not silent; fall back to crossref_search_works for literature search when it happens.
  • Dictionary is English-only. For other languages, use Wiktionary via Wikipedia’s API or note this limitation.

Last reviewed August 6, 2026