@pipeshub-ai/mcp 2.4.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- export declare const PIPESHUB_INSTRUCTIONS = "# PipesHub MCP \u2014 instructions for the LLM\n\nPipesHub is the user's workplace AI platform. It indexes their documents,\nknowledge base content, and connector sources (Drive, Box, Confluence,\nSlack, Jira, Gmail, ...). When in doubt, the answer is in PipesHub.\n\n## Full-document tasks: `pipeshub_search` \u2192 `pipeshub_get_record_content`\n\n`pipeshub_chat` answers from a handful of retrieved passages \u2014 it never\nreads a whole document. Whenever the task depends on a document's\nCOMPLETE content, fetch the document itself:\n\n1. `pipeshub_search` with the document's name / topic.\n2. Take the top hit's `recordId`.\n3. `pipeshub_get_record_content`, and answer from the returned content.\n\nTasks that need this path \u2014 anything where missing part of the document\ncould make the answer wrong:\n\n- Summarize / TL;DR / key points / takeaways / action items of a doc.\n- Extract or list ALL of something (dates, owners, requirements, ...).\n- Check whether / where a doc mentions something.\n- Translate, rewrite, outline, review, or reformat a doc.\n- Compare named docs (fetch each `recordId`).\n- Any question explicitly scoped to ONE named document \u2014 chat retrieval\n cannot be restricted to a single record.\n\n## Default tool: `pipeshub_chat`\n\n**Use `pipeshub_chat` for any question that could plausibly be answered\nby the user's PipesHub-indexed data** and is not a full-document task:\n\n- A question that may span several documents, or where you don't yet\n know which record holds the answer (e.g. \"what did Aashil say about\n onboarding?\").\n- Anything about company / org policies, processes, decisions, or\n history (e.g. \"what's our vacation policy?\", \"who owns the auth\n service?\").\n- Anything explicitly mentioning PipesHub itself, or its sources\n (Drive / Box / Confluence / Slack / Gmail / Jira / etc.) when the\n user has those connected.\n- Open-ended \"what do we know about X\" questions where the answer\n likely lives in the org's documents.\n\nDo NOT answer those from your own knowledge \u2014 `pipeshub_chat` grounds\nthe answer in the user's actual indexed content and returns citations\nthe user can verify.\n\n## When to use the other tools\n\n- `pipeshub_search` \u2014 locate a document by name or topic and resolve it\n to a `recordId`. To read or summarize one specific document, search,\n then pass the top hit's `recordId` to `pipeshub_get_record_content`.\n- `pipeshub_download_record` \u2014 when the user wants the file as stored\n (download, attach, open). Never to read or summarize \u2014 that is\n `pipeshub_get_record_content` `mode:\"content\"`, which returns\n parsed text with a metadata header. Get the `recordId` from a chat\n citation or from `pipeshub_search`. `convertTo` is only\n `application/pdf`.\n- `pipeshub_get_record_content` \u2014 when you need a record's full parsed\n content (returned as a single `content` string: metadata header plus\n the document's text) without downloading the original file. Prefer this\n over download when the question is about what the record says.\n- `pipeshub_directory` \u2014 people, groups, teams, and `whoami` lookups.\n Not for documents.\n- `pipeshub_sources` \u2014 call once at the start of a session to discover\n which connectors / KB / models are available, then cache the result.\n- `pipeshub_agents` \u2014 list the org's configured **agents** (specialized\n assistants with their own prompt, tools, and knowledge scope).\n\n## Knowledge Sources\n\nA source (an app connector or a KB) holds record groups (a project, space,\ndrive, folder), which hold records (one ticket, page, file). Records nest \u2014\nan epic over its stories, a page over its child pages.\n\n**Every tool returns metadata or content.**\n\n- `pipeshub_search` / `pipeshub_chat` \u2014 content, but only a ranked sample of\n blocks: never all blocks of a record, never every record that matches, never\n a complete list of what exists.\n- `mode:\"lookup\"` and `mode:\"navigate\"` \u2014 metadata: recordIds, fields, and\n structure. No document text. `mode:\"content\"` \u2014 one whole record.\n\n**Combining them.** Search finds a starting point by wording; navigate on a\n`recordId` reveals what search structurally cannot \u2014 siblings, children,\nlinked records, and the group's total count. For a question that must be\nexhaustive (\"all\", \"how many\", \"every\"), do NOT count search hits or trust a\nchat answer: navigate the record group, which reports the real total. For a\nrecord's siblings, navigate its parent \u2014 take the id from the `Path` line.\n\n**A named record** \u2014 an issue key, a Confluence / Drive / Slack link, an\nexternal ID \u2192 `mode:\"lookup\"` FIRST. It returns that record's metadata (for a\nticket: status, assignee, priority, dates) plus its `recordId`, which often\nanswers the question outright. Never guess a `recordId`.\n\nFor search, pass a connector id from `pipeshub_sources` as `apps: [\"<id>\"]`\nand a collection id (`kind: \"knowledgeBase\"`) as `kb: [\"<id>\"]`. Any source\nid works as `nodeId` to navigate. Navigate and lookup end in a `Next:` line\nnaming the exact follow-up call \u2014 follow it.\n\n## Agents\n\nSome orgs configure **agents** for specific jobs (e.g. a Slack messenger, a\nJira ticket creator, a Salesforce CRM updater). To run a turn against an\nagent, call `pipeshub_chat` with its `agentId` (from `pipeshub_agents`)\n\u2014 optionally with an agent `chatMode` (`auto` by default, or `quick` /\n`verification` / `deep`). Keep passing the same `agentId` plus the\nreturned `conversationId` on follow-up turns.\n\n**When to route to an agent vs plain chat:**\n- The user names a system/action that maps to an agent (e.g. \"post to\n Slack\", \"create a Jira ticket\", \"update the Salesforce deal\") \u2192 call\n `pipeshub_agents`, pick the matching agent, and use it.\n- Plain question about the org's knowledge or the public web \u2192 just use\n `pipeshub_chat` (no `agentId`) with `internal_search` or `web_search`.\n\n**If you are unsure which agent or route fits the request**, call\n`pipeshub_agents` FIRST and read the returned names/descriptions, then\neither pick the best match or present the list to the user and let them\nchoose. Do NOT guess an agent blindly, and do NOT refuse \u2014 list the agents\nand decide from real data. The list may be empty (no agents configured),\nin which case fall back to plain `pipeshub_chat`.\n\n## Conversation lifecycle\n\n`pipeshub_chat` is a single tool that handles both starting and\ncontinuing conversations (plain or with an `agentId`). On the first turn\nomit `conversationId`; on every subsequent turn pass back the\n`conversationId` returned by the previous call (along with the same\n`agentId` if you used one). Server-side context is preserved \u2014 do NOT\nreplay prior messages. Only start a fresh conversation when the user\nexplicitly asks to clear context.\n";
1
+ export declare const PIPESHUB_INSTRUCTIONS = "# PipesHub MCP \u2014 instructions for the LLM\n\nPipesHub is the user's workplace AI platform. It indexes their documents,\nknowledge base content, and connector sources (Drive, Box, Confluence,\nSlack, Jira, Gmail, ...). When in doubt, the answer is in PipesHub.\n\n## Full-document tasks: `pipeshub_search` \u2192 `pipeshub_get_record_content`\n\n`pipeshub_chat` answers from a handful of retrieved passages \u2014 it never\nreads a whole document. Whenever the task depends on a document's\nCOMPLETE content, fetch the document itself:\n\n1. `pipeshub_search` with the document's name / topic.\n2. Take the top hit's `recordId`.\n3. `pipeshub_get_record_content`, and answer from the returned content.\n\nTasks that need this path \u2014 anything where missing part of the document\ncould make the answer wrong:\n\n- Summarize / TL;DR / key points / takeaways / action items of a doc.\n- Extract or list ALL of something (dates, owners, requirements, ...).\n- Check whether / where a doc mentions something.\n- Translate, rewrite, outline, review, or reformat a doc.\n- Compare named docs (fetch each `recordId`).\n- Any question explicitly scoped to ONE named document \u2014 chat retrieval\n cannot be restricted to a single record.\n\n## Default tool: `pipeshub_chat`\n\n**Use `pipeshub_chat` for any question that could plausibly be answered\nby the user's PipesHub-indexed data** and is not a full-document task:\n\n- A question that may span several documents, or where you don't yet\n know which record holds the answer (e.g. \"what did Aashil say about\n onboarding?\").\n- Anything about company / org policies, processes, decisions, or\n history (e.g. \"what's our vacation policy?\", \"who owns the auth\n service?\").\n- Anything explicitly mentioning PipesHub itself, or its sources\n (Drive / Box / Confluence / Slack / Gmail / Jira / etc.) when the\n user has those connected.\n- Open-ended \"what do we know about X\" questions where the answer\n likely lives in the org's documents.\n\nDo NOT answer those from your own knowledge \u2014 `pipeshub_chat` grounds\nthe answer in the user's actual indexed content and returns citations\nthe user can verify.\n\n## When to use the other tools\n\n- `pipeshub_search` \u2014 locate a document by name or topic and resolve it\n to a `recordId`. To read or summarize one specific document, search,\n then pass the top hit's `recordId` to `pipeshub_get_record_content`.\n- `pipeshub_download_record` \u2014 when the user wants the file as stored\n (download, attach, open). Never to read or summarize \u2014 that is\n `pipeshub_get_record_content` `mode:\"content\"`, which returns\n parsed text with a metadata header. Get the `recordId` from a chat\n citation or from `pipeshub_search`. `convertTo` is only\n `application/pdf`.\n- `pipeshub_get_record_content` \u2014 when you need a record's full parsed\n content (returned as a single `content` string: metadata header plus\n the document's text) without downloading the original file. Prefer this\n over download when the question is about what the record says.\n- `pipeshub_directory` \u2014 people, groups, teams, and `whoami` lookups.\n Not for documents or files \u2014 that is `pipeshub_search`.\n- `pipeshub_sources` \u2014 call once at the start of a session to discover\n which connectors / KB / models are available, then cache the result.\n- `pipeshub_agents` \u2014 list the org's configured **agents** (specialized\n assistants with their own prompt, tools, and knowledge scope).\n\n## Knowledge Sources\n\nA source (an app connector or a KB) holds record groups (a project, space,\ndrive, folder), which hold records (one ticket, page, file). Records nest \u2014\nan epic over its stories, a page over its child pages.\n\n**Every tool returns metadata or content.**\n\n- `pipeshub_search` / `pipeshub_chat` \u2014 content, but only a ranked sample of\n blocks: never all blocks of a record, never every record that matches, never\n a complete list of what exists.\n- `mode:\"lookup\"` and `mode:\"navigate\"` \u2014 metadata: recordIds, fields, and\n structure. No document text. `mode:\"content\"` \u2014 one whole record.\n\n**Combining them.** Search finds a starting point by wording; navigate on a\n`recordId` reveals what search structurally cannot \u2014 siblings, children,\nlinked records, and the group's total count. For a question that must be\nexhaustive (\"all\", \"how many\", \"every\"), do NOT count search hits or trust a\nchat answer: navigate the record group, which reports the real total. For a\nrecord's siblings, navigate its parent \u2014 take the id from the `Path` line.\n\n**A named record** \u2014 an issue key, a Confluence / Drive / Slack link, an\nexternal ID \u2192 `mode:\"lookup\"` FIRST. It returns that record's metadata (for a\nticket: status, assignee, priority, dates) plus its `recordId`, which often\nanswers the question outright. Never guess a `recordId`.\n\nFor search, pass a connector id from `pipeshub_sources` as `apps: [\"<id>\"]`\nand a collection id (`kind: \"knowledgeBase\"`) as `kb: [\"<id>\"]`. Any source\nid works as `nodeId` to navigate. Navigate and lookup end in a `Next:` line\nnaming the exact follow-up call \u2014 follow it.\n\n## Agents\n\nSome orgs configure **agents** for specific jobs (e.g. a Slack messenger, a\nJira ticket creator, a Salesforce CRM updater). To run a turn against an\nagent, call `pipeshub_chat` with its `agentId` (from `pipeshub_agents`)\n\u2014 optionally with an agent `chatMode` (`auto` by default, or `quick` /\n`verification` / `deep`). Keep passing the same `agentId` plus the\nreturned `conversationId` on follow-up turns.\n\n**When to route to an agent vs plain chat:**\n- The user names a system/action that maps to an agent (e.g. \"post to\n Slack\", \"create a Jira ticket\", \"update the Salesforce deal\") \u2192 call\n `pipeshub_agents`, pick the matching agent, and use it.\n- Plain question about the org's knowledge or the public web \u2192 just use\n `pipeshub_chat` (no `agentId`) with `internal_search` or `web_search`.\n\n**If you are unsure which agent or route fits the request**, call\n`pipeshub_agents` FIRST and read the returned names/descriptions, then\neither pick the best match or present the list to the user and let them\nchoose. Do NOT guess an agent blindly, and do NOT refuse \u2014 list the agents\nand decide from real data. The list may be empty (no agents configured),\nin which case fall back to plain `pipeshub_chat`.\n\n## Conversation lifecycle\n\n`pipeshub_chat` is a single tool that handles both starting and\ncontinuing conversations (plain or with an `agentId`). On the first turn\nomit `conversationId`; on every subsequent turn pass back the\n`conversationId` returned by the previous call (along with the same\n`agentId` if you used one). Server-side context is preserved \u2014 do NOT\nreplay prior messages. Only start a fresh conversation when the user\nexplicitly asks to clear context.\n";
2
2
  //# sourceMappingURL=instructions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/mcp-server/instructions.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,0yNAqIjC,CAAC"}
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/mcp-server/instructions.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,o1NAqIjC,CAAC"}
@@ -66,7 +66,7 @@ the user can verify.
66
66
  the document's text) without downloading the original file. Prefer this
67
67
  over download when the question is about what the record says.
68
68
  - \`pipeshub_directory\` — people, groups, teams, and \`whoami\` lookups.
69
- Not for documents.
69
+ Not for documents or files — that is \`pipeshub_search\`.
70
70
  - \`pipeshub_sources\` — call once at the start of a session to discover
71
71
  which connectors / KB / models are available, then cache the result.
72
72
  - \`pipeshub_agents\` — list the org's configured **agents** (specialized
@@ -1 +1 @@
1
- {"version":3,"file":"pipeshubDirectory.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/pipeshubDirectory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAKzB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAS7C,QAAA,MAAM,IAAI;;;;;;;;;;;;CA+BT,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,OAAO,IAAI,CA+J9D,CAAC"}
1
+ {"version":3,"file":"pipeshubDirectory.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/pipeshubDirectory.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAQzB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAuB7C,QAAA,MAAM,IAAI;;;;;;;;;;;;CAoCT,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,OAAO,IAAI,CAgK9D,CAAC"}
@@ -6,7 +6,20 @@ import { usersGetAllUsers } from "../../funcs/usersGetAllUsers.js";
6
6
  import { usersGetUserById } from "../../funcs/usersGetUserById.js";
7
7
  import { userGroupsGetAllUserGroups } from "../../funcs/userGroupsGetAllUserGroups.js";
8
8
  import { teamsGetUserTeams } from "../../funcs/teamsGetUserTeams.js";
9
+ import { GetAllUsersRequest$zodSchema } from "../../models/getallusersop.js";
10
+ import { GetAllUserGroupsRequest$zodSchema } from "../../models/getallusergroupsop.js";
11
+ import { GetUserTeamsRequest$zodSchema } from "../../models/getuserteamsop.js";
9
12
  import { decodeBearer, errorResult, jsonResult, expiredTokenError, readJson, } from "./_helpers.js";
13
+ function defaultLimit(schema) {
14
+ const limit = schema.parse({}).limit;
15
+ if (typeof limit !== "number") {
16
+ throw new Error("list request schema is missing a numeric limit default");
17
+ }
18
+ return limit;
19
+ }
20
+ const listUsersLimit = defaultLimit(GetAllUsersRequest$zodSchema);
21
+ const listGroupsLimit = defaultLimit(GetAllUserGroupsRequest$zodSchema);
22
+ const listTeamsLimit = defaultLimit(GetUserTeamsRequest$zodSchema);
10
23
  const args = {
11
24
  action: z.enum([
12
25
  "whoami",
@@ -21,30 +34,36 @@ const args = {
21
34
  + "`limit`, `search` (substring match against name or email).\n"
22
35
  + "- `get_user` — full profile for one user. Required `userId`. "
23
36
  + "Use `whoami` to find your own id first if needed.\n"
24
- + "- `list_groups` — paginated list of user groups (with `userCount`).\n"
37
+ + "- `list_groups` — paginated list of user groups (with `userCount`). "
38
+ + "Optional `search` matches group name.\n"
25
39
  + "- `list_my_teams` — teams the authenticated user belongs to, with "
26
- + "capability flags."),
27
- userId: z.string().optional().describe("Required when `action` is `get_user`. 24-character ObjectId."),
28
- page: z.number().int().min(1).optional().describe("Pagination — 1-based page number. Used by list_* actions."),
29
- limit: z.number().int().min(1).max(100).optional().describe("Pagination — items per page. Used by list_* actions."),
30
- search: z.string().optional().describe("Substring match against name / email. Used by list_users."),
40
+ + "capability flags. Optional `search` matches team name."),
41
+ userId: z.string().optional().describe("Required when `action` is `get_user`. 24-character ObjectId. "
42
+ + "Take it from `whoami` (yourself) or from a `list_users` hit."),
43
+ page: z.number().int().min(1).optional().describe("1-based page for list_* actions. Omit for page 1."),
44
+ limit: z.number().int().min(1).max(100).optional().describe("Items per page for list_* (1–100). Omit for the action default: "
45
+ + `${listUsersLimit} users, ${listGroupsLimit} groups, `
46
+ + `${listTeamsLimit} teams.`),
47
+ search: z.string().optional().describe("Substring match on list_users (name or email), list_groups (name), "
48
+ + "and list_my_teams (name). An empty list means no match, not an error."),
31
49
  };
32
50
  export const tool$pipeshubDirectory = {
33
51
  name: "pipeshub_directory",
34
- description: `Look up people, groups, and teams in PipesHub. One tool with five
35
- actions — pick the right \`action\`:
52
+ description: `Look up people, groups, and teams in PipesHub. Five actions — pick
53
+ \`action\`. Not for documents or files: that is \`pipeshub_search\`.
36
54
 
37
- - \`whoami\` — who is the caller? Use this whenever you need the
38
- authenticated user's own id, email, or full name (e.g. before
39
- \`get_user\` on themselves). Errors if the credential is expired
40
- or revoked.
41
- - \`list_users\` — search / page through org users.
42
- - \`get_user\` — full \`User\` document for one user (requires \`userId\`).
43
- - \`list_groups\` — list user groups with \`userCount\`.
44
- - \`list_my_teams\` — teams the caller belongs to, with capability flags
45
- (\`canEdit\` / \`canDelete\` / \`canManageMembers\`).
55
+ - \`whoami\` — the caller's id, email, full name. Use before \`get_user\`
56
+ on yourself. Errors if the credential is expired or revoked.
57
+ - \`list_users\` — page org users; \`search\` matches name or email.
58
+ - \`get_user\` — full \`User\` for one \`userId\`.
59
+ - \`list_groups\` — org groups with \`userCount\`; \`search\` matches name.
60
+ - \`list_my_teams\` — teams the caller is on, with \`canEdit\` /
61
+ \`canDelete\` / \`canManageMembers\`; \`search\` matches name.
46
62
 
47
- Output shape varies by action; see each action's docs above.`,
63
+ Omit \`page\`/\`limit\` for the first page (\`page\` 1). No match is an
64
+ empty \`users\`/\`groups\`/\`teams\` array, not an error.
65
+ \`pagination.hasNextPage\` (teams: \`hasNext\`) says whether to request
66
+ the next page.`,
48
67
  scopes: ["read"],
49
68
  annotations: {
50
69
  title: "PipesHub directory (users / groups / teams / whoami)",
@@ -1 +1 @@
1
- {"version":3,"file":"pipeshubDirectory.js","sourceRoot":"","sources":["../../../src/mcp-server/tools/pipeshubDirectory.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2EAA2E;AAC3E,0BAA0B;AAE1B,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EACL,YAAY,EACZ,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,QAAQ,GACT,MAAM,eAAe,CAAC;AAEvB,MAAM,IAAI,GAAG;IACX,MAAM,EAAE,CAAC,CAAC,IAAI,CA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AAC,KAAK,EAAE,eAAe,CAAC,CAAC;gBAC7D,IAAI,CAAC,MAAM,CAAC,EAAE;oBAAE,OAAO,MAAM,CAAC,MAAM,CAAC;gBACrC,OAAO,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAClC,CAAC;YAED,KAAK,eAAe,CAAC,CAAC,CAAC;gBACrB,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,iBAAiB,CAAC,MAAM,EAAE;oBAC/C,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,MAAM,EAAE,IAAI,CAAC,MAAM;iBACpB,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;gBAChC,IAAI,CAAC,MAAM,CAAC,EAAE;oBAAE,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBACzD,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;gBAC5D,IAAI,CAAC,MAAM,CAAC,EAAE;oBAAE,OAAO,MAAM,CAAC,MAAM,CAAC;gBACrC,OAAO,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAClC,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAC"}
package/esm/tool-names.js CHANGED
@@ -22,7 +22,7 @@ export const toolNames = [
22
22
  },
23
23
  {
24
24
  "name": "pipeshub_directory",
25
- "description": "Look up people, groups, and teams in PipesHub. One tool with five\nactions — pick the right `action`:\n\n- `whoami` — who is the caller? Use this whenever you need the\n authenticated user's own id, email, or full name (e.g. before\n `get_user` on themselves). Errors if the credential is expired\n or revoked.\n- `list_users` — search / page through org users.\n- `get_user` — full `User` document for one user (requires `userId`).\n- `list_groups` — list user groups with `userCount`.\n- `list_my_teams` — teams the caller belongs to, with capability flags\n (`canEdit` / `canDelete` / `canManageMembers`).\n\nOutput shape varies by action; see each action's docs above."
25
+ "description": "Look up people, groups, and teams in PipesHub. Five actions — pick\n`action`. Not for documents or files: that is `pipeshub_search`.\n\n- `whoami` — the caller's id, email, full name. Use before `get_user`\n on yourself. Errors if the credential is expired or revoked.\n- `list_users` — page org users; `search` matches name or email.\n- `get_user` — full `User` for one `userId`.\n- `list_groups` — org groups with `userCount`; `search` matches name.\n- `list_my_teams` — teams the caller is on, with `canEdit` /\n `canDelete` / `canManageMembers`; `search` matches name.\n\nOmit `page`/`limit` for the first page (`page` 1). No match is an\nempty `users`/`groups`/`teams` array, not an error.\n`pagination.hasNextPage` (teams: `hasNext`) says whether to request\nthe next page."
26
26
  },
27
27
  {
28
28
  "name": "pipeshub_agents",
@@ -1 +1 @@
1
- {"version":3,"file":"tool-names.js","sourceRoot":"","sources":["../src/tool-names.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,CAAC,MAAM,SAAS,GAAgD;IACpE;QACE,MAAM,EAAE,kBAAkB;QAC1B,aAAa,EAAE,4wBAA4wB;KAC5xB;IACD;QACE,MAAM,EAAE,eAAe;QACvB,aAAa,EAAE,w+EAAw+E;KACx/E;IACD;QACE,MAAM,EAAE,iBAAiB;QACzB,aAAa,EAAE,0iDAA0iD;KAC1jD;IACD;QACE,MAAM,EAAE,0BAA0B;QAClC,aAAa,EAAE,miBAAmiB;KACnjB;IACD;QACE,MAAM,EAAE,6BAA6B;QACrC,aAAa,EAAE,06HAA06H;KAC17H;IACD;QACE,MAAM,EAAE,oBAAoB;QAC5B,aAAa,EAAE,uqBAAuqB;KACvrB;IACD;QACE,MAAM,EAAE,iBAAiB;QACzB,aAAa,EAAE,82CAA82C;KAC93C;CACF,CAAC"}
1
+ {"version":3,"file":"tool-names.js","sourceRoot":"","sources":["../src/tool-names.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,MAAM,CAAC,MAAM,SAAS,GAAgD;IACpE;QACE,MAAM,EAAE,kBAAkB;QAC1B,aAAa,EAAE,4wBAA4wB;KAC5xB;IACD;QACE,MAAM,EAAE,eAAe;QACvB,aAAa,EAAE,w+EAAw+E;KACx/E;IACD;QACE,MAAM,EAAE,iBAAiB;QACzB,aAAa,EAAE,0iDAA0iD;KAC1jD;IACD;QACE,MAAM,EAAE,0BAA0B;QAClC,aAAa,EAAE,miBAAmiB;KACnjB;IACD;QACE,MAAM,EAAE,6BAA6B;QACrC,aAAa,EAAE,06HAA06H;KAC17H;IACD;QACE,MAAM,EAAE,oBAAoB;QAC5B,aAAa,EAAE,+wBAA+wB;KAC/xB;IACD;QACE,MAAM,EAAE,iBAAiB;QACzB,aAAa,EAAE,82CAA82C;KAC93C;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipeshub-ai/mcp",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "mcpName": "io.github.pipeshub-ai/mcp",
5
5
  "author": "Pipeshub",
6
6
  "type": "module",
@@ -13,7 +13,7 @@ FROM ghcr.io/yc-software/qm/sandbox-base
13
13
  # separate package. Pin the exact version: the sandbox image and the PipesHub
14
14
  # instance's MCP tool surface need to stay compatible, and an unpinned install
15
15
  # turns a remote release into a silent change in agent behaviour.
16
- ARG PIPESHUB_CLI_VERSION=2.4.1
16
+ ARG PIPESHUB_CLI_VERSION=2.4.2
17
17
  RUN npm install -g "@pipeshub-ai/mcp@${PIPESHUB_CLI_VERSION}" \
18
18
  && pipeshub --help >/dev/null
19
19
 
@@ -67,7 +67,7 @@ the user can verify.
67
67
  the document's text) without downloading the original file. Prefer this
68
68
  over download when the question is about what the record says.
69
69
  - \`pipeshub_directory\` — people, groups, teams, and \`whoami\` lookups.
70
- Not for documents.
70
+ Not for documents or files — that is \`pipeshub_search\`.
71
71
  - \`pipeshub_sources\` — call once at the start of a session to discover
72
72
  which connectors / KB / models are available, then cache the result.
73
73
  - \`pipeshub_agents\` — list the org's configured **agents** (specialized
@@ -7,6 +7,9 @@ import { usersGetAllUsers } from "../../funcs/usersGetAllUsers.js";
7
7
  import { usersGetUserById } from "../../funcs/usersGetUserById.js";
8
8
  import { userGroupsGetAllUserGroups } from "../../funcs/userGroupsGetAllUserGroups.js";
9
9
  import { teamsGetUserTeams } from "../../funcs/teamsGetUserTeams.js";
10
+ import { GetAllUsersRequest$zodSchema } from "../../models/getallusersop.js";
11
+ import { GetAllUserGroupsRequest$zodSchema } from "../../models/getallusergroupsop.js";
12
+ import { GetUserTeamsRequest$zodSchema } from "../../models/getuserteamsop.js";
10
13
  import { ToolDefinition } from "../tools.js";
11
14
  import {
12
15
  decodeBearer,
@@ -16,6 +19,20 @@ import {
16
19
  readJson,
17
20
  } from "./_helpers.js";
18
21
 
22
+ function defaultLimit(
23
+ schema: z.ZodType<{ limit?: number | undefined }>,
24
+ ): number {
25
+ const limit = schema.parse({}).limit;
26
+ if (typeof limit !== "number") {
27
+ throw new Error("list request schema is missing a numeric limit default");
28
+ }
29
+ return limit;
30
+ }
31
+
32
+ const listUsersLimit = defaultLimit(GetAllUsersRequest$zodSchema);
33
+ const listGroupsLimit = defaultLimit(GetAllUserGroupsRequest$zodSchema);
34
+ const listTeamsLimit = defaultLimit(GetUserTeamsRequest$zodSchema);
35
+
19
36
  const args = {
20
37
  action: z.enum([
21
38
  "whoami",
@@ -31,41 +48,47 @@ const args = {
31
48
  + "`limit`, `search` (substring match against name or email).\n"
32
49
  + "- `get_user` — full profile for one user. Required `userId`. "
33
50
  + "Use `whoami` to find your own id first if needed.\n"
34
- + "- `list_groups` — paginated list of user groups (with `userCount`).\n"
51
+ + "- `list_groups` — paginated list of user groups (with `userCount`). "
52
+ + "Optional `search` matches group name.\n"
35
53
  + "- `list_my_teams` — teams the authenticated user belongs to, with "
36
- + "capability flags.",
54
+ + "capability flags. Optional `search` matches team name.",
37
55
  ),
38
56
  userId: z.string().optional().describe(
39
- "Required when `action` is `get_user`. 24-character ObjectId.",
57
+ "Required when `action` is `get_user`. 24-character ObjectId. "
58
+ + "Take it from `whoami` (yourself) or from a `list_users` hit.",
40
59
  ),
41
60
  page: z.number().int().min(1).optional().describe(
42
- "Pagination — 1-based page number. Used by list_* actions.",
61
+ "1-based page for list_* actions. Omit for page 1.",
43
62
  ),
44
63
  limit: z.number().int().min(1).max(100).optional().describe(
45
- "Pagination — items per page. Used by list_* actions.",
64
+ "Items per page for list_* (1–100). Omit for the action default: "
65
+ + `${listUsersLimit} users, ${listGroupsLimit} groups, `
66
+ + `${listTeamsLimit} teams.`,
46
67
  ),
47
68
  search: z.string().optional().describe(
48
- "Substring match against name / email. Used by list_users.",
69
+ "Substring match on list_users (name or email), list_groups (name), "
70
+ + "and list_my_teams (name). An empty list means no match, not an error.",
49
71
  ),
50
72
  };
51
73
 
52
74
  export const tool$pipeshubDirectory: ToolDefinition<typeof args> = {
53
75
  name: "pipeshub_directory",
54
76
  description:
55
- `Look up people, groups, and teams in PipesHub. One tool with five
56
- actions — pick the right \`action\`:
57
-
58
- - \`whoami\` — who is the caller? Use this whenever you need the
59
- authenticated user's own id, email, or full name (e.g. before
60
- \`get_user\` on themselves). Errors if the credential is expired
61
- or revoked.
62
- - \`list_users\` — search / page through org users.
63
- - \`get_user\` — full \`User\` document for one user (requires \`userId\`).
64
- - \`list_groups\` — list user groups with \`userCount\`.
65
- - \`list_my_teams\` — teams the caller belongs to, with capability flags
66
- (\`canEdit\` / \`canDelete\` / \`canManageMembers\`).
67
-
68
- Output shape varies by action; see each action's docs above.`,
77
+ `Look up people, groups, and teams in PipesHub. Five actions — pick
78
+ \`action\`. Not for documents or files: that is \`pipeshub_search\`.
79
+
80
+ - \`whoami\` — the caller's id, email, full name. Use before \`get_user\`
81
+ on yourself. Errors if the credential is expired or revoked.
82
+ - \`list_users\` — page org users; \`search\` matches name or email.
83
+ - \`get_user\` — full \`User\` for one \`userId\`.
84
+ - \`list_groups\` — org groups with \`userCount\`; \`search\` matches name.
85
+ - \`list_my_teams\` — teams the caller is on, with \`canEdit\` /
86
+ \`canDelete\` / \`canManageMembers\`; \`search\` matches name.
87
+
88
+ Omit \`page\`/\`limit\` for the first page (\`page\` 1). No match is an
89
+ empty \`users\`/\`groups\`/\`teams\` array, not an error.
90
+ \`pagination.hasNextPage\` (teams: \`hasNext\`) says whether to request
91
+ the next page.`,
69
92
  scopes: ["read"],
70
93
  annotations: {
71
94
  title: "PipesHub directory (users / groups / teams / whoami)",
package/src/tool-names.ts CHANGED
@@ -22,7 +22,7 @@ export const toolNames: Array<{ name: string; description: string }>= [
22
22
  },
23
23
  {
24
24
  "name": "pipeshub_directory",
25
- "description": "Look up people, groups, and teams in PipesHub. One tool with five\nactions — pick the right `action`:\n\n- `whoami` — who is the caller? Use this whenever you need the\n authenticated user's own id, email, or full name (e.g. before\n `get_user` on themselves). Errors if the credential is expired\n or revoked.\n- `list_users` — search / page through org users.\n- `get_user` — full `User` document for one user (requires `userId`).\n- `list_groups` — list user groups with `userCount`.\n- `list_my_teams` — teams the caller belongs to, with capability flags\n (`canEdit` / `canDelete` / `canManageMembers`).\n\nOutput shape varies by action; see each action's docs above."
25
+ "description": "Look up people, groups, and teams in PipesHub. Five actions — pick\n`action`. Not for documents or files: that is `pipeshub_search`.\n\n- `whoami` — the caller's id, email, full name. Use before `get_user`\n on yourself. Errors if the credential is expired or revoked.\n- `list_users` — page org users; `search` matches name or email.\n- `get_user` — full `User` for one `userId`.\n- `list_groups` — org groups with `userCount`; `search` matches name.\n- `list_my_teams` — teams the caller is on, with `canEdit` /\n `canDelete` / `canManageMembers`; `search` matches name.\n\nOmit `page`/`limit` for the first page (`page` 1). No match is an\nempty `users`/`groups`/`teams` array, not an error.\n`pagination.hasNextPage` (teams: `hasNext`) says whether to request\nthe next page."
26
26
  },
27
27
  {
28
28
  "name": "pipeshub_agents",