Skip to content

fix(chat): wire Sanity Context Knowledge Base MCP tools and org token fallback for Agent AJ - #742

Merged
codercatdev merged 1 commit into
devfrom
fix_agent_aj_mcp
Oct 14, 2026
Merged

codercatdev merged 1 commit into
devfrom
fix_agent_aj_mcp

Conversation

@codercatdev

Copy link
Copy Markdown
Contributor

Summary

  • Expose all tools returned by the Sanity Context MCP endpoint (https://api.sanity.io/v1/context/organizations/ovF2qiKSO/mcp/agent-aj-mcp), including initial_context and knowledge_base_read for the AJ Knowlege Jokes Knowledge Base, in /api/chat.
  • Pre-fetch initial_context outline when available and include it in Agent AJ's system prompt so knowledgeBaseId and entry paths are immediately available on Step 1.
  • Add MCP tool output fallback synthesis when models complete tool calls without emitting trailing text deltas.
  • Add token resolution fallback (SANITY_CONTEXT_TOKEN, SANITY_AUTH_TOKEN, SANITY_API_READ_TOKEN, SANITY_API_WRITE_TOKEN) and sync SANITY_AUTH_TOKEN / SANITY_CONTEXT_TOKEN to Cloudflare Workers in deploy-workers.yml.
  • Expose knowledge_base_read in /api/mcp and /.well-known/mcp/server-card.json, and add a Coding joke quick prompt chip in ChatModal.astro.

@github-actions

Copy link
Copy Markdown

⚡ Cloudflare Worker Preview Ready!

Environment URL
PR Preview https://fc089c8c-codingcatdev-dev.codingcatdev.workers.dev
Dev Custom Domain https://dev.codingcat.dev
  • Worker Version ID: fc089c8c-1ad4-4c5d-b0da-63353cd61f0c
  • Protection: Restricted to @codingcat.dev accounts via Cloudflare Zero Trust Access

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant