Skip to main content
Glama

nope-mcp — Open Educational Resources search

Grounded passage search (RAG) scoped by a spell

search_passages
Read-onlyIdempotent

THE DEFAULT TOOL FOR QUESTION-SHAPED QUERIES ("wie/warum/was hilft bei X?", "how do I…?"): retrieves the best-matching fulltext passages from the corpus and returns them with citations (source resource, page, heading, source URL) — answer the user FROM the passages and cite each source. (For discovery intent — "finde/empfiehl Materialien" — use search_content instead, or afterwards to offer browsable links.) Keep question topic-only. Ranking is hybrid keyword+vector, so phrase the question as a topical statement that names the subject and the target group ("Friedenserziehung in der Grundschule: Einstieg in das Thema Frieden mit Kindern"), not as the user's literal sentence ("Wie kann ich …?"). Results are capped at two passages per document; a passage with only a snippet and no text has no fulltext yet — say so instead of guessing. Passages come from learning resources under Creative Commons, Public Domain and free software/documentation licenses, and DINI-AG-KIM license types that resolve to one of these and from articles, wikis, publications and the other content kinds. Other matching learning resources appear in metadataOnlyMatches (naddr, title, license, creator/publisher, sourcePage) without text, because their license does not permit quoting — point the user to them by title, license and link, never quote or paraphrase them as content. Cite the license and the creator/publisher with every learning-resource passage. licenseFilter narrows learning resources: "open" = CC0, Public Domain, CC BY, CC BY-SA, their DINI-AG-KIM license-type equivalents, and free software/documentation licenses (GPL, LGPL, AGPL, GFDL, MIT, Apache 2.0, BSD); "cc-any" = all of "open" plus every other Creative Commons license, incl. KIM non-commercial/no-derivatives (normally no metadataOnlyMatches); "any" = also unlicensed and all-rights-reserved resources, as metadataOnlyMatches. Scope is required but simple: with no source restriction from the user, pass the content kinds (e.g. kinds:[30142] for educational resources, [30040,30041] for publications, [30023] for articles). Route source restrictions ("nur Content von X") into the scope parameters: a metadata publisher (most organisations — resolve_publisher finds the exact spelling) goes into search as a QUOTED field filter, e.g. search:'publisher.name:"LEHRE LADEN"' (unquoted multi-word names match nothing); a Nostr signing account (resolve_author → pubkey) goes into authors. A published grimoire spell (kind 777, nevent or event id) can replace inline scope entirely; the response carries the canonical spell for whatever scope was used — publish it (e.g. via grimoire) to make the scope reusable. Spells may use $me/$contacts; they resolve to the calling user (pass me if the transport is anonymous). Scope materialization (tag/search/community spells) runs against the primary relay only; the passage search itself fans out to every selected indexed relay. Fails rather than widening scope: an empty scope, unreachable relay (relay_unreachable — tell the user to retry), or unreachable index is a typed error, never a silently unscoped search.

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": {
      "question": "<question>"
    },
    "name": "search_passages"
  }
}

Input Schema

NameRequiredDescriptionDefault
meNoWho $me refers to (npub or hex). Defaults to the calling identity.
tagNoInline scope: one tag filter, e.g. {letter:"h", values:["<community-pk>"]}.
kindsNoInline scope: content kinds (e.g. 30142).
limitNoPassages to return (1-25, default 10); also caps metadataOnlyMatches.
sinceNoInline scope: absolute Unix seconds or relative (7d, 1mo, now).
spellNoPublished spell: nevent, note id, or 64-hex event id.
untilNoInline scope: absolute Unix seconds or relative.
relaysNoRelay selection (list_relays set), by full URL or short name (e.g. "oersi", "sodix"). Every selected relay with a passage index is searched and the results merged.
searchNoInline scope: NIP-50 term selecting the EVENTS in scope (distinct from question). Supports field filters; quote multi-word values: publisher.name:"LEHRE LADEN".
authorsNoInline scope: Nostr event-author pubkeys (hex/npub/$me/$contacts) — resolve names via resolve_author. NOT for metadata publishers; those go into `search`.
questionYesThe question or topic to find grounding passages for.
licenseFilterNoRestrict learning-resource (30142) hits by license: "open" (CC0, Public Domain, CC BY, CC BY-SA, their DINI-AG-KIM license-type equivalents, and free software/documentation licenses (GPL, LGPL, AGPL, GFDL, MIT, Apache 2.0, BSD)), "cc-any" (all of "open" plus every other Creative Commons license, incl. KIM non-commercial/no-derivatives) or "any" (every resource, including unlicensed and all-rights-reserved). Default: the server's ceiling (normally any). Other content types are never license-filtered.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / tag / additionalProperties
      Added value: +false
  2. Changed3 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / tag / additionalProperties
      Removed value: -false
  3. Changed1 schema field changed
    • changedInput schema / properties / relays / description
      Previous value: -"Relay selection (list_relays set), by full URL or short name (e.g. \"oersi\", \"sodix\"). First mapped relay is used."New value: +"Relay selection (list_relays set), by full URL or short name (e.g. \"oersi\", \"sodix\"). Every selected relay with a passage index is searched and the results merged."
  4. Changed1 schema field changed
    • changedInput schema / properties / licenseFilter / description
      Previous value: -"Restrict learning-resource (30142) hits by license: \"open\" (CC0, Public Domain, CC BY, CC BY-SA), \"cc-any\" (all Creative Commons and Public Domain) or \"any\" (every resource, including unlicensed and all-rights-reserved). Default: the server's ceiling (normally any). Other content types are never license-filtered."New value: +"Restrict learning-resource (30142) hits by license: \"open\" (CC0, Public Domain, CC BY, CC BY-SA, their DINI-AG-KIM license-type equivalents, and free software/documentation licenses (GPL, LGPL, AGPL, GFDL, MIT, Apache 2.0, BSD)), \"cc-any\" (all of \"open\" plus every other Creative Commons license, incl. KIM non-commercial/no-derivatives) or \"any\" (every resource, including unlicensed and all-rights-reserved). Default: the server's ceiling (normally any). Other content types are never license-filtered."
  5. Changed2 schema fields changed
    • addedInput schema / properties / licenseFilter
      Added value: +{
      +  "description": "Restrict learning-resource (30142) hits by license: \"open\" (CC0, Public Domain, CC BY, CC BY-SA), \"cc-any\" (all Creative Commons and Public Domain) or \"any\" (every resource, including unlicensed and all-rights-reserved). Default: the server's ceiling (normally any). Other content types are never license-filtered.",
      +  "enum": [
      +    "open",
      +    "cc-any",
      +    "any"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"Passages to return (1-25, default 10)."New value: +"Passages to return (1-25, default 10); also caps metadataOnlyMatches."
  6. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare read-only/idempotent/safe, so the description justifiably focuses on richer behavior: hybrid keyword+vector ranking, two-passages-per-document cap, snippet-only-means-no-fulltext rule, metadataOnlyMatches appearing without text due to licensing, and typed errors (relay_unreachable) instead of widening scope. This is far beyond what the annotations convey.

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?

The critical use case is front-loaded, but the body is a dense single-paragraph wall with heavy parentheticals and multiple embedded rules (licensing, spells, scope routing, error semantics) that hurt scanability. Every sentence is relevant, but the structure could be broken into clearer segments.

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, the description carries the return-value burden and does so: passages with citations (source resource, page, heading, source URL), metadataOnlyMatches fields (naddr, title, license, creator/publisher, sourcePage), and typed error outcomes. Complete for a 12-parameter complex tool.

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: keep `question` topic-only and phrase it as a topical statement, route publisher restrictions into `search` as a quoted field filter, route signing accounts into `authors`, and explains licenseFilter's three tiers in prose. It does not fully re-specify every parameter, but the added routing guidance is substantial.

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?

Opens with a specific verb+resource+scope: 'THE DEFAULT TOOL FOR QUESTION-SHAPED QUERIES... retrieves the best-matching fulltext passages from the corpus and returns them with citations.' It explicitly distinguishes itself from the sibling search_content by naming the discovery-intent case that selects the other tool.

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?

Gives explicit when-to-use (question-shaped queries), when-not (discovery intent), and names the alternative (search_content) plus a sequencing hint ('or afterwards to offer browsable links'). It also states the spell-publishing path for reusable scope, leaving little to inference.

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.