Skip to content

Commit 066e7b9

Browse files
fix(linkedin): default search_people limit to 25 (was silently 10)
Users asking 'find 25 founders' got 10 back because Unipile's default page size is 10 and the model didn't pass limit. Now: default 25 server-side, description explicitly tells the model to pass limit when the user gives a count. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f93f4a4 commit 066e7b9

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

features/pilot-tools/linkedin/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const connectionsSchema = z.object({ ...withToken });
2727
export const searchPeopleSchema = z.object({
2828
...withToken,
2929
keywords: z.string().describe("Search query (name, title, company, etc.)"),
30-
limit: z.number().int().min(1).max(50).optional().describe("Max results (default 10)"),
30+
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)."),
3131
});
3232

3333
// ── Invitations ───────────────────────────────────────────────────────────────

features/pilot-tools/linkedin/tools.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,15 @@ export function registerLinkedinTools(server: McpServer): void {
3838

3939
server.registerTool("linkedin_search_people", {
4040
title: "Search LinkedIn people",
41-
description: "Search LinkedIn for people by keywords.",
41+
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.",
4242
inputSchema: S.searchPeopleSchema,
43-
}, async (input) => callApi(input.bearer_token, (t) =>
44-
repo.searchPeople(t, strip(input, "bearer_token"))));
43+
}, async (input) => callApi(input.bearer_token, (t) => {
44+
const args = strip(input, "bearer_token") as Record<string, unknown>;
45+
// Default to 25 when caller doesn't specify — Unipile's silent default of 10
46+
// surprised users asking for more.
47+
if (args.limit === undefined) args.limit = 25;
48+
return repo.searchPeople(t, args);
49+
}));
4550

4651
// ── Invitations ─────────────────────────────────────────────────────────────
4752
server.registerTool("linkedin_send_invitation", {

0 commit comments

Comments
 (0)