@pipeshub-ai/mcp 2.4.0 → 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 actual file\n bytes (download, attach, open). Get the `recordId` either from\n citations on a prior `pipeshub_chat` response or from\n `pipeshub_search`.\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,upNAmIjC,CAAC"}
1
+ {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../src/mcp-server/instructions.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,qBAAqB,o1NAqIjC,CAAC"}
@@ -55,16 +55,18 @@ the user can verify.
55
55
  - \`pipeshub_search\` — locate a document by name or topic and resolve it
56
56
  to a \`recordId\`. To read or summarize one specific document, search,
57
57
  then pass the top hit's \`recordId\` to \`pipeshub_get_record_content\`.
58
- - \`pipeshub_download_record\` — when the user wants the actual file
59
- bytes (download, attach, open). Get the \`recordId\` either from
60
- citations on a prior \`pipeshub_chat\` response or from
61
- \`pipeshub_search\`.
58
+ - \`pipeshub_download_record\` — when the user wants the file as stored
59
+ (download, attach, open). Never to read or summarize — that is
60
+ \`pipeshub_get_record_content\` \`mode:"content"\`, which returns
61
+ parsed text with a metadata header. Get the \`recordId\` from a chat
62
+ citation or from \`pipeshub_search\`. \`convertTo\` is only
63
+ \`application/pdf\`.
62
64
  - \`pipeshub_get_record_content\` — when you need a record's full parsed
63
65
  content (returned as a single \`content\` string: metadata header plus
64
66
  the document's text) without downloading the original file. Prefer this
65
67
  over download when the question is about what the record says.
66
68
  - \`pipeshub_directory\` — people, groups, teams, and \`whoami\` lookups.
67
- Not for documents.
69
+ Not for documents or files — that is \`pipeshub_search\`.
68
70
  - \`pipeshub_sources\` — call once at the start of a session to discover
69
71
  which connectors / KB / models are available, then cache the result.
70
72
  - \`pipeshub_agents\` — list the org's configured **agents** (specialized
@@ -1 +1 @@
1
- {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/mcp-server/instructions.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,sEAAsE;AACtE,sEAAsE;AACtE,gEAAgE;AAEhE,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIpC,CAAC"}
1
+ {"version":3,"file":"instructions.js","sourceRoot":"","sources":["../../src/mcp-server/instructions.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,sEAAsE;AACtE,sEAAsE;AACtE,gEAAgE;AAEhE,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqIpC,CAAC"}
@@ -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,CAAC;QACb,QAAQ;QACR,YAAY;QACZ,UAAU;QACV,aAAa;QACb,eAAe;KAChB,CAAC,CAAC,QAAQ,CACT,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M,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"pipeshubDownloadRecord.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/pipeshubDownloadRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAG3D,QAAA,MAAM,IAAI;;;CAUT,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,cAAc,CAAC,OAAO,IAAI,CAiCnE,CAAC"}
1
+ {"version":3,"file":"pipeshubDownloadRecord.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/pipeshubDownloadRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAG3D,QAAA,MAAM,IAAI;;;CAaT,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,cAAc,CAAC,OAAO,IAAI,CAiCnE,CAAC"}
@@ -6,23 +6,26 @@ const args = {
6
6
  recordId: z.string().min(1).describe("Record identifier — usually a UUID for connector-sourced records or "
7
7
  + "a 24-character ObjectId for uploaded records. Get it from a chat "
8
8
  + "citation (`citations[*].recordId`) or from a `pipeshub_search` hit."),
9
- convertTo: z.string().optional().describe("Optional server-side format conversion target (e.g. `pdf`). When "
10
- + "omitted, the original file bytes are returned."),
9
+ convertTo: z.string().optional().describe("The only conversion target connectors honour is `application/pdf` "
10
+ + "(the MIME type, not `pdf`). A bare `pdf` is ignored and the "
11
+ + "original file is returned with no error. Omit for the file as "
12
+ + "stored. Does not parse the document — use "
13
+ + "`pipeshub_get_record_content` `mode:\"content\"` for that."),
11
14
  };
12
15
  export const tool$pipeshubDownloadRecord = {
13
16
  name: "pipeshub_download_record",
14
- description: `Stream the binary content of a single record from PipesHub.
17
+ description: `Download the file as stored for one record — not PipesHub's parsed
18
+ content, metadata header, or summary.
15
19
 
16
- Typical sources for the \`recordId\`:
17
- - A chat citation:
18
- \`pipeshub_chat\` response → \`citations[*].recordId\`.
19
- - A search result:
20
- \`pipeshub_search\` response → \`hits[*].recordId\` /
21
- \`uniqueRecords[*].recordId\`.
20
+ Use this when the user wants the file itself (download, attach, open).
21
+ Get \`recordId\` from a chat citation or a \`pipeshub_search\` hit.
22
22
 
23
- Response \`Content-Type\` is forwarded from the upstream service —
24
- \`application/pdf\`, \`application/octet-stream\`, etc. Binary content is
25
- returned base64-encoded; text content is returned inline.`,
23
+ Do not use this to read, summarize, or answer "what does this doc
24
+ say?" regardless of format. That is \`pipeshub_get_record_content\`
25
+ \`mode:"content"\`. Text formats come back inline; images, audio, and
26
+ binary as base64.
27
+
28
+ \`convertTo\` accepts only \`application/pdf\`; anything else is ignored.`,
26
29
  scopes: ["read"],
27
30
  annotations: {
28
31
  title: "Download a document by record id",
@@ -1 +1 @@
1
- {"version":3,"file":"pipeshubDownloadRecord.js","sourceRoot":"","sources":["../../../src/mcp-server/tools/pipeshubDownloadRecord.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,IAAI,GAAG;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAClC,sEAAsE;UAClE,mEAAmE;UACnE,qEAAqE,CAC1E;IACD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACvC,mEAAmE;UAC/D,gDAAgD,CACrD;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAgC;IACtE,IAAI,EAAE,0BAA0B;IAChC,WAAW,EACT;;;;;;;;;;;0DAWsD;IACxD,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,WAAW,EAAE;QACX,KAAK,EAAE,kCAAkC;QACzC,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,IAAI;QACpB,aAAa,EAAE,KAAK;QACpB,YAAY,EAAE,IAAI;KACnB;IACD,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,yBAAyB,CAAC,MAAM,EAAE;YACvD,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,EAAE,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,QAAQ,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B,CAAC,MAAM,EAAE;YACvD,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,EAAE,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;QACxD,IAAI,CAAC,MAAM,CAAC,EAAE;YAAE,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEzD,OAAO,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;CACF,CAAC"}
package/esm/tool-names.js CHANGED
@@ -14,7 +14,7 @@ export const toolNames = [
14
14
  },
15
15
  {
16
16
  "name": "pipeshub_download_record",
17
- "description": "Stream the binary content of a single record from PipesHub.\n\nTypical sources for the `recordId`:\n- A chat citation:\n `pipeshub_chat` response → `citations[*].recordId`.\n- A search result:\n `pipeshub_search` response → `hits[*].recordId` /\n `uniqueRecords[*].recordId`.\n\nResponse `Content-Type` is forwarded from the upstream service —\n`application/pdf`, `application/octet-stream`, etc. Binary content is\nreturned base64-encoded; text content is returned inline."
17
+ "description": "Download the file as stored for one record — not PipesHub's parsed\ncontent, metadata header, or summary.\n\nUse this when the user wants the file itself (download, attach, open).\nGet `recordId` from a chat citation or a `pipeshub_search` hit.\n\nDo not use this to read, summarize, or answer \"what does this doc\nsay?\" regardless of format. That is `pipeshub_get_record_content`\n`mode:\"content\"`. Text formats come back inline; images, audio, and\nbinary as base64.\n\n`convertTo` accepts only `application/pdf`; anything else is ignored."
18
18
  },
19
19
  {
20
20
  "name": "pipeshub_get_record_content",
@@ -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,8dAA8d;KAC9e;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.0",
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.0
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
 
@@ -56,16 +56,18 @@ the user can verify.
56
56
  - \`pipeshub_search\` — locate a document by name or topic and resolve it
57
57
  to a \`recordId\`. To read or summarize one specific document, search,
58
58
  then pass the top hit's \`recordId\` to \`pipeshub_get_record_content\`.
59
- - \`pipeshub_download_record\` — when the user wants the actual file
60
- bytes (download, attach, open). Get the \`recordId\` either from
61
- citations on a prior \`pipeshub_chat\` response or from
62
- \`pipeshub_search\`.
59
+ - \`pipeshub_download_record\` — when the user wants the file as stored
60
+ (download, attach, open). Never to read or summarize — that is
61
+ \`pipeshub_get_record_content\` \`mode:"content"\`, which returns
62
+ parsed text with a metadata header. Get the \`recordId\` from a chat
63
+ citation or from \`pipeshub_search\`. \`convertTo\` is only
64
+ \`application/pdf\`.
63
65
  - \`pipeshub_get_record_content\` — when you need a record's full parsed
64
66
  content (returned as a single \`content\` string: metadata header plus
65
67
  the document's text) without downloading the original file. Prefer this
66
68
  over download when the question is about what the record says.
67
69
  - \`pipeshub_directory\` — people, groups, teams, and \`whoami\` lookups.
68
- Not for documents.
70
+ Not for documents or files — that is \`pipeshub_search\`.
69
71
  - \`pipeshub_sources\` — call once at the start of a session to discover
70
72
  which connectors / KB / models are available, then cache the result.
71
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)",
@@ -10,26 +10,29 @@ const args = {
10
10
  + "citation (`citations[*].recordId`) or from a `pipeshub_search` hit.",
11
11
  ),
12
12
  convertTo: z.string().optional().describe(
13
- "Optional server-side format conversion target (e.g. `pdf`). When "
14
- + "omitted, the original file bytes are returned.",
13
+ "The only conversion target connectors honour is `application/pdf` "
14
+ + "(the MIME type, not `pdf`). A bare `pdf` is ignored and the "
15
+ + "original file is returned with no error. Omit for the file as "
16
+ + "stored. Does not parse the document — use "
17
+ + "`pipeshub_get_record_content` `mode:\"content\"` for that.",
15
18
  ),
16
19
  };
17
20
 
18
21
  export const tool$pipeshubDownloadRecord: ToolDefinition<typeof args> = {
19
22
  name: "pipeshub_download_record",
20
23
  description:
21
- `Stream the binary content of a single record from PipesHub.
24
+ `Download the file as stored for one record — not PipesHub's parsed
25
+ content, metadata header, or summary.
22
26
 
23
- Typical sources for the \`recordId\`:
24
- - A chat citation:
25
- \`pipeshub_chat\` response → \`citations[*].recordId\`.
26
- - A search result:
27
- \`pipeshub_search\` response → \`hits[*].recordId\` /
28
- \`uniqueRecords[*].recordId\`.
27
+ Use this when the user wants the file itself (download, attach, open).
28
+ Get \`recordId\` from a chat citation or a \`pipeshub_search\` hit.
29
29
 
30
- Response \`Content-Type\` is forwarded from the upstream service —
31
- \`application/pdf\`, \`application/octet-stream\`, etc. Binary content is
32
- returned base64-encoded; text content is returned inline.`,
30
+ Do not use this to read, summarize, or answer "what does this doc
31
+ say?" regardless of format. That is \`pipeshub_get_record_content\`
32
+ \`mode:"content"\`. Text formats come back inline; images, audio, and
33
+ binary as base64.
34
+
35
+ \`convertTo\` accepts only \`application/pdf\`; anything else is ignored.`,
33
36
  scopes: ["read"],
34
37
  annotations: {
35
38
  title: "Download a document by record id",
package/src/tool-names.ts CHANGED
@@ -14,7 +14,7 @@ export const toolNames: Array<{ name: string; description: string }>= [
14
14
  },
15
15
  {
16
16
  "name": "pipeshub_download_record",
17
- "description": "Stream the binary content of a single record from PipesHub.\n\nTypical sources for the `recordId`:\n- A chat citation:\n `pipeshub_chat` response → `citations[*].recordId`.\n- A search result:\n `pipeshub_search` response → `hits[*].recordId` /\n `uniqueRecords[*].recordId`.\n\nResponse `Content-Type` is forwarded from the upstream service —\n`application/pdf`, `application/octet-stream`, etc. Binary content is\nreturned base64-encoded; text content is returned inline."
17
+ "description": "Download the file as stored for one record — not PipesHub's parsed\ncontent, metadata header, or summary.\n\nUse this when the user wants the file itself (download, attach, open).\nGet `recordId` from a chat citation or a `pipeshub_search` hit.\n\nDo not use this to read, summarize, or answer \"what does this doc\nsay?\" regardless of format. That is `pipeshub_get_record_content`\n`mode:\"content\"`. Text formats come back inline; images, audio, and\nbinary as base64.\n\n`convertTo` accepts only `application/pdf`; anything else is ignored."
18
18
  },
19
19
  {
20
20
  "name": "pipeshub_get_record_content",
@@ -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",