Skip to content

feat(agent-toolkit): add get_monday_knowledge tool#429

Open
rami-monday wants to merge 6 commits into
masterfrom
feat/get-monday-knowledge-tool
Open

feat(agent-toolkit): add get_monday_knowledge tool#429
rami-monday wants to merge 6 commits into
masterfrom
feat/get-monday-knowledge-tool

Conversation

@rami-monday

@rami-monday rami-monday commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a new get_monday_knowledge MCP tool that exposes monday.com knowledge to external agents through a single unified interface
  • Accepts two params: query (string) and kind enum (developer_docs | general)
  • Routes kind=general to the internal knowledge_base_search GraphQL query (backed by the internal knowledge base) — returns cited source article links
  • Routes kind=developer_docs to ask_developer_docs GraphQL query
  • Both paths normalize to the same response shape: { answer, sources[], kind }
  • Extends BaseMondayApiTool (registered in allGraphqlApiTools) so it loads under the default gateway mode — add 'get_monday_knowledge' to PUBLIC_MCP_TOOLS in platform-mcp-gateway to make it visible externally

Why

Exposes monday.com knowledge (both product and API/developer) to external agents through a single tool with a consistent response contract. The kind enum is extensible for future knowledge domains.

Test plan

  • All 8 unit tests pass (npx jest get-monday-knowledge)
  • Build compiles cleanly (npm run build)
  • Manual test: call get_monday_knowledge with kind=general and a product question
  • Manual test: call get_monday_knowledge with kind=developer_docs and a dev question
  • Add 'get_monday_knowledge' to PUBLIC_MCP_TOOLS in platform-mcp-gateway (separate PR)

🤖 Generated with Claude Code

rami-monday and others added 4 commits July 12, 2026 10:24
Adds a new `get_monday_knowledge` MCP tool that exposes monday.com
knowledge to external agents through a single unified interface.

The tool accepts a `query` and a `kind` enum (`developer_docs` |
`general`), routing to the appropriate backend:
- `general` → internal `knowledge_base_search` GraphQL query
  (ai-vector-search / help center, with cited source links)
- `developer_docs` → `ask_developer_docs` GraphQL query (kapa.ai)

Both paths return a normalized `{ answer, sources[], kind }` response.

Using `BaseMondayApiTool` (allGraphqlApiTools) so the tool is loaded
under the default gateway mode and can be added to PUBLIC_MCP_TOOLS.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@@ -0,0 +1,15 @@
export const knowledgeBaseSearchQuery = `

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didnt generate gql, run yarn codegen

Comment on lines +63 to +64

The kind enum is extensible — more domains (e.g. marketplace, release_notes) may be added in future versions.`;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The kind enum is extensible more domains (e.g. marketplace, release_notes) may be added in future versions.`;

private async queryGeneralKnowledge(query: string): Promise<ToolOutputType<never>> {
const response = await this.mondayApi.request<KnowledgeBaseSearchResponse>(knowledgeBaseSearchQuery, {
query,
limit: 5,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 5?


const result = response.ask_developer_docs;
if (!result?.answer) {
throw new Error('No answer found in developer docs. Try rephrasing your question.');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can on all error flows use this this instead
rethrowWithContext

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or throw new ToolValidationError

),
};

interface AskDeveloperDocsResponse {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should create gql for it and use it properly I guess

rami-monday and others added 2 commits July 20, 2026 18:17
- Use gql tag for both queries and run codegen to generate typed operations
- Move ask_developer_docs query into the tool's own graphql file
- Remove hardcoded limit (GraphQL schema default handles it)
- Use rethrowWithContext for all error flows
- Remove extensibility note from getDescription

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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.

3 participants