Skip to content

feat(agent-toolkit): add get_account_context tool#319

Open
guygotlieb wants to merge 5 commits intomasterfrom
feat/add-get-account-context-tool
Open

feat(agent-toolkit): add get_account_context tool#319
guygotlieb wants to merge 5 commits intomasterfrom
feat/add-get-account-context-tool

Conversation

@guygotlieb
Copy link
Copy Markdown
Collaborator

@guygotlieb guygotlieb commented Apr 23, 2026

Summary

  • Add new get_account_context READ-only tool to agent-toolkit (v5.4.0)
  • Fetches account-level metadata via me { account { ... } } GraphQL query
  • Returns me.account directly — no response reshaping, the GQL query is the single source of truth

Changes

New files

  • get-account-context-tool.ts — Tool class extending BaseMondayApiTool<undefined> (no input params)
  • get-account-context.graphql.ts — GraphQL query fetching Account fields including Plan and AccountProduct
  • get-account-context.test.ts — 3 test cases (full data, minimal/null fields, auth error)

Modified files

  • index.ts — Registered GetAccountContextTool in allGraphqlApiTools array + re-export
  • package.json — Version bump 5.3.2 → 5.4.0
  • graphql.ts / gql.ts — Codegen'd types for GetAccountContextQuery

What the tool returns

Account identity (id, name, slug, tier), plan details (tier, period, max_users), active products (core, CRM, software, service, marketing, forms, whiteboard), trial status, and account settings (first_day_of_the_week, show_timeline_weekends, country_code).

Design decisions

  • No helpers/formatting layer — the GQL query defines the exact response shape. No null filtering, no response reshaping. The AI agent consuming this handles nulls fine.
  • Removed logo field — not useful for AI agent context.

Testing

  • 3 unit tests (full data, minimal/null fields, auth error)
  • CI: all checks pass

Related


📋 Monday.com tracking item

🤖 Generated with Claude Code

@guygotlieb guygotlieb force-pushed the feat/add-get-account-context-tool branch from 68dfad4 to 9e38be5 Compare April 23, 2026 18:48
Add a new READ-only tool that fetches account-level context via
me { account { ... } } GraphQL query. Returns account identity,
plan details, active products, trial status, and configuration.
Enables AI agents to make informed decisions when operating in
account context (used by create-board, forms, campaigns, CRM skills).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@guygotlieb guygotlieb force-pushed the feat/add-get-account-context-tool branch from 9e38be5 to 456bbcf Compare April 23, 2026 22:06
…nt as-is

Remove helpers.ts and return me.account directly from the GQL query
instead of reshaping the response. Drop unused logo field.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@guygotlieb
Copy link
Copy Markdown
Collaborator Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

guygotlieb and others added 3 commits April 26, 2026 15:28
…er count queries

Add explicit mention of active_members_count and max_users fields so
the model picks this tool over list_users_and_teams when users ask
about team size or member count.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
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