Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/pilot-tools/linkedin/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const connectionsSchema = z.object({ ...withToken });
export const searchPeopleSchema = z.object({
...withToken,
keywords: z.string().describe("Search query (name, title, company, etc.)"),
limit: z.number().int().min(1).max(50).optional().describe("Max results (default 10)"),
limit: z.number().int().min(1).max(50).optional().describe("Max results (default 25, hard max 50). ALWAYS pass this when the user asks for a specific number (e.g. 'find 25 founders' -> limit: 25)."),
});

// ── Invitations ───────────────────────────────────────────────────────────────
Expand Down
11 changes: 8 additions & 3 deletions features/pilot-tools/linkedin/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ export function registerLinkedinTools(server: McpServer): void {

server.registerTool("linkedin_search_people", {
title: "Search LinkedIn people",
description: "Search LinkedIn for people by keywords.",
description: "Search LinkedIn for people by keywords. Returns up to 25 by default (hard max 50). When the user asks for a specific number (e.g. 'find 30 X'), pass `limit` to match.",
inputSchema: S.searchPeopleSchema,
}, async (input) => callApi(input.bearer_token, (t) =>
repo.searchPeople(t, strip(input, "bearer_token"))));
}, async (input) => callApi(input.bearer_token, (t) => {
const args = strip(input, "bearer_token") as Record<string, unknown>;
// Default to 25 when caller doesn't specify — Unipile's silent default of 10
// surprised users asking for more.
if (args.limit === undefined) args.limit = 25;
return repo.searchPeople(t, args);
}));

// ── Invitations ─────────────────────────────────────────────────────────────
server.registerTool("linkedin_send_invitation", {
Expand Down
Loading