Phase 11: crop_seed_api_lessons tool + Pioneer fallback #3

Merged
justin merged 1 commits from api-lessons-pioneer-fallback into main 2026-05-25 13:19:17 -04:00
Owner

Summary

Add the fifth MCP tool crop_seed_api_lessons(topic?) backed by docs_mcp/lessons.md. This is the only source of opinionated content in the server — everything else returns verbatim from vendor catalogs.

The Pioneer fallback is the critical anti-hallucination addition. Pioneer's ToS bans automation; without this tool an agent might surface Bayer/Asgrow chunks as mediocre matches for a Pioneer query and try to answer anyway. The tool's docstring tells the agent to call it on any Pioneer / P-series question; the pioneer section says clearly: "I don't have Pioneer's variety data indexed... please consult Pioneer or an extension service." and "Do NOT invent Pioneer hybrid ratings."

Lesson sections shipped

  • pioneer — anti-hallucination policy + extension-trial fallback
  • rating-scales — Bayer 1-9, Golden Harvest 9-to-1, what R/MR/S/Rps1c/R3 mean
  • maturity-semantics — corn RM days vs soybean MG vs wheat class
  • trait-glossary — SSRIB, VT2PRIB, XF, E3, Conkesta, Clearfield, etc.
  • scn-resistance — race coverage + Peking vs PI 88788
  • regional-listings — how to interpret Bayer's "local profiles"
  • sources-not-yet-indexed — which vendors aren't in the corpus yet
  • checking-your-work — always call lookup_variety before quoting

Test plan

  • topic='pioneer' returns the Pioneer fallback policy section.
  • topic='rating' returns just rating-scales (slug-match preferred over body-match).
  • topic='trait' returns just trait-glossary.
  • topic=None returns the full 10K-char curated index (8 sections).
  • topic='zzzzzz' returns a no-match message listing all available slugs.
  • Tool is registered with FastMCP — mcp.list_tools() shows it alongside the other four.
## Summary Add the fifth MCP tool `crop_seed_api_lessons(topic?)` backed by `docs_mcp/lessons.md`. This is the **only source of opinionated content** in the server — everything else returns verbatim from vendor catalogs. The Pioneer fallback is the critical anti-hallucination addition. Pioneer's ToS bans automation; without this tool an agent might surface Bayer/Asgrow chunks as mediocre matches for a Pioneer query and try to answer anyway. The tool's docstring tells the agent to call it on any Pioneer / P-series question; the `pioneer` section says clearly: *"I don't have Pioneer's variety data indexed... please consult Pioneer or an extension service."* and *"Do NOT invent Pioneer hybrid ratings."* ## Lesson sections shipped - **pioneer** — anti-hallucination policy + extension-trial fallback - **rating-scales** — Bayer 1-9, Golden Harvest 9-to-1, what R/MR/S/Rps1c/R3 mean - **maturity-semantics** — corn RM days vs soybean MG vs wheat class - **trait-glossary** — SSRIB, VT2PRIB, XF, E3, Conkesta, Clearfield, etc. - **scn-resistance** — race coverage + Peking vs PI 88788 - **regional-listings** — how to interpret Bayer's "local profiles" - **sources-not-yet-indexed** — which vendors aren't in the corpus yet - **checking-your-work** — always call `lookup_variety` before quoting ## Test plan - [x] `topic='pioneer'` returns the Pioneer fallback policy section. - [x] `topic='rating'` returns just `rating-scales` (slug-match preferred over body-match). - [x] `topic='trait'` returns just `trait-glossary`. - [x] `topic=None` returns the full 10K-char curated index (8 sections). - [x] `topic='zzzzzz'` returns a no-match message listing all available slugs. - [x] Tool is registered with FastMCP — `mcp.list_tools()` shows it alongside the other four.
justin added 1 commit 2026-05-25 13:19:16 -04:00
Add the fifth MCP tool — crop_seed_api_lessons(topic?) — backed by
docs_mcp/lessons.md, the ONLY source of opinionated content in the
server. Everything else (search_docs, get_page, lookup_variety)
returns verbatim from vendor catalogs; lessons.md fills the gaps
the corpus can't cover.

The Pioneer fallback is the critical anti-hallucination piece:
Pioneer's ToS bans automation, so the corpus has no Pioneer data.
Without this tool, an agent might surface Bayer/Asgrow chunks as
mediocre matches for a Pioneer query. The tool's docstring tells
the agent to call it on any Pioneer / P-series question; the
'pioneer' section says clearly:

  "I don't have Pioneer's variety data indexed... please consult
  Pioneer or an extension service."

  "Do NOT invent Pioneer hybrid ratings."

Other lesson sections cover knowledge the agent needs to interpret
search_docs / get_page output correctly:

- rating-scales: Bayer 1-9, Golden Harvest 9-to-1, what
  R/MR/S/Rps1c/R3 mean in soybean disease columns
- maturity-semantics: corn RM days vs soybean MG vs wheat class +
  qualitative early/medium/late
- trait-glossary: SSRIB, VT2PRIB, XF, E3, Conkesta, Clearfield, etc.
- scn-resistance: race coverage + Peking vs PI 88788 source
- regional-listings: how to interpret Bayer's "local profiles"
- sources-not-yet-indexed: which vendors aren't in the corpus yet
- checking-your-work: always call lookup_variety before quoting

Lesson lookup prefers slug-match (returns just `rating-scales` for
topic="rating", not every section that mentions ratings); falls
back to body-match only when no slug matches.

Smoke-tested with topic=pioneer, topic=rating, topic=trait,
topic=zzzzzz (no match), and topic=None (full index = 10K chars,
8 sections).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
justin merged commit 28d8cb83b3 into main 2026-05-25 13:19:17 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: justin/seed-mcp#3