From ce4ce22b2a0fcd64d4fa17158e7bb879ee27945a Mon Sep 17 00:00:00 2001 From: Mathieu Picciolli Date: Sun, 5 Jul 2026 08:32:44 -0400 Subject: [PATCH 1/5] feat: flag truncated results in pcm_search_cyclist and pcm_search_team Both search tools capped results at 10 rows silently, so an agent could not tell whether more matches existed and the search needed narrowing. Fetch one extra row (LIMIT 11) and expose a `truncated` boolean in the output schema, mirroring the pattern already used by pcm_query_save. Co-Authored-By: Claude Fable 5 --- README.md | 4 ++-- src/tools/search-cyclist.ts | 17 +++++++++++++++-- src/tools/search-team.ts | 17 +++++++++++++++-- .../__snapshots__/search-cyclist.test.ts.snap | 4 ++++ .../__snapshots__/search-team.test.ts.snap | 4 ++++ test/tools/search-cyclist.test.ts | 14 ++++++++++++++ test/tools/search-team.test.ts | 14 ++++++++++++++ 7 files changed, 68 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c202b4b..16550a2 100644 --- a/README.md +++ b/README.md @@ -90,9 +90,9 @@ All tools are prefixed with `pcm_`. Every tool except `pcm_update_save` is read- | **pcm_get_save_schema** | List every table inside a `.cdb` save file, with its ID and name, plus the total table count. | | **pcm_get_table_schema** | Inspect a single table by name. Returns its columns (name, SQL type, NOT NULL and primary key flags) and its row count. Use `pcm_get_save_schema` first to discover available table names. | | **pcm_get_player_info** | Get the active human player and their team from a save file. Returns the player login plus team details (name, resolved division name, resolved country name, evaluation and manager). | -| **pcm_search_cyclist** | Search for a cyclist by first name and/or last name (case-insensitive partial match). Returns up to 10 matches with all ratings (plain, mountain, medium mountain, downhilling, cobble, time trial, prologue, sprint, acceleration, endurance, resistance, recuperation, hill, baroudeur, current ability) and the resolved country name. `mediumMountain` and `currentAbility` are `null` on saves that pre-date those columns. | +| **pcm_search_cyclist** | Search for a cyclist by first name and/or last name (case-insensitive partial match). Returns up to 10 matches with all ratings (plain, mountain, medium mountain, downhilling, cobble, time trial, prologue, sprint, acceleration, endurance, resistance, recuperation, hill, baroudeur, current ability) and the resolved country name; a `truncated` flag signals when more matches exist. `mediumMountain` and `currentAbility` are `null` on saves that pre-date those columns. | | **pcm_get_team_roster** | List a team's roster (defaults to the active player's team when `teamId` is omitted). Joins DYN_cyclist with its active DYN_contract_cyclist and STA_type_rider; per rider returns name, country, age (derived from birth date and the current game date), rider type, overall ability, contract end year, wage, market value and all per-terrain ability ratings. Ordered by overall ability, highest first. Errors if `teamId` does not exist. | -| **pcm_search_team** | Search for a team by name (case-insensitive partial match against both the full name and short name). Returns up to 10 matches with the resolved division name, country name, evaluation and general manager. | +| **pcm_search_team** | Search for a team by name (case-insensitive partial match against both the full name and short name). Returns up to 10 matches with the resolved division name, country name, evaluation and general manager; a `truncated` flag signals when more matches exist. | | **pcm_query_save** | Run a read-only SQL query (`SELECT` / `WITH … SELECT` only) against any table in a save file. Write/DDL statements are rejected. Results are capped (default 100, max 1000 rows). | | **pcm_update_save** | Apply a single `INSERT`/`UPDATE`/`DELETE` statement to a save and write the modified database to a **new** `.cdb` at `outputPath`. The source save is never overwritten (`outputPath` must differ from `savePath`); `SELECT`, schema changes (`DROP`/`CREATE`/`ALTER`) and stacked statements are rejected. Returns the written path and the number of rows changed. | | **pcm_generate_startlist_xml** | Generate a PCM startlist XML document from a list of teams and their cyclist rosters. Looks up the race by `IDrace` in the save to derive the output file name from `STA_race.gene_sz_filename` (e.g. `c0_almeria.xml`), and returns both the file name and the XML as text. Team and cyclist IDs map to `DYN_team.IDteam` / `DYN_cyclist.IDcyclist` (look them up with `pcm_search_cyclist` or `pcm_query_save`). | diff --git a/src/tools/search-cyclist.ts b/src/tools/search-cyclist.ts index 9bbf1c5..c2bcc27 100644 --- a/src/tools/search-cyclist.ts +++ b/src/tools/search-cyclist.ts @@ -20,8 +20,15 @@ const cyclistSchema = z.object({ ), }); +const MAX_RESULTS = 10; + const outputSchema = z.object({ cyclists: z.array(cyclistSchema).describe("Matching cyclists"), + truncated: z + .boolean() + .describe( + `Whether more matches exist beyond the ${MAX_RESULTS} returned — narrow the search with a longer name to see them`, + ), }); export function registerSearchCyclist(server: McpServer): void { @@ -30,7 +37,7 @@ export function registerSearchCyclist(server: McpServer): void { { title: "Search PCM cyclist by name", description: - "Search for a cyclist in a Pro Cycling Manager `.cdb` save file by first name and/or last name (case-insensitive partial match). Returns up to 10 matching cyclists with all their ratings and their country name.", + "Search for a cyclist in a Pro Cycling Manager `.cdb` save file by first name and/or last name (case-insensitive partial match). Returns up to 10 matching cyclists with all their ratings and their country name; `truncated` is true when more matches exist beyond the 10 returned.", inputSchema: { savePath: z.string().describe("Absolute path to the .cdb save file"), firstName: z @@ -76,10 +83,11 @@ export function registerSearchCyclist(server: McpServer): void { LEFT JOIN STA_country co ON r.fkIDcountry = co.IDcountry WHERE LOWER(c.gene_sz_lastname) LIKE LOWER(:lastName) AND LOWER(c.gene_sz_firstname) LIKE LOWER(:firstName) - LIMIT 10`, + LIMIT ${MAX_RESULTS + 1}`, ); const cyclists: z.infer[] = []; + let truncated = false; try { const first = firstName.trim(); const last = lastName.trim(); @@ -93,6 +101,10 @@ export function registerSearchCyclist(server: McpServer): void { }); while (stmt.step()) { + if (cyclists.length >= MAX_RESULTS) { + truncated = true; + break; + } const row = stmt.getAsObject(); cyclists.push({ id: Number(row.IDcyclist), @@ -110,6 +122,7 @@ export function registerSearchCyclist(server: McpServer): void { const output: z.infer = { cyclists, + truncated, }; return output; }), diff --git a/src/tools/search-team.ts b/src/tools/search-team.ts index 6a80462..aebe037 100644 --- a/src/tools/search-team.ts +++ b/src/tools/search-team.ts @@ -22,8 +22,15 @@ const teamSchema = z.object({ .describe("General manager name (gene_sz_manager_general)"), }); +const MAX_RESULTS = 10; + const outputSchema = z.object({ teams: z.array(teamSchema).describe("Matching teams"), + truncated: z + .boolean() + .describe( + `Whether more matches exist beyond the ${MAX_RESULTS} returned — narrow the search with a longer name to see them`, + ), }); export function registerSearchTeam(server: McpServer): void { @@ -32,7 +39,7 @@ export function registerSearchTeam(server: McpServer): void { { title: "Search PCM team by name", description: - "Search for a team in a Pro Cycling Manager `.cdb` save file by name (case-insensitive partial match against both the full name and the short name). Returns up to 10 matching teams with their division name, country name, evaluation and general manager.", + "Search for a team in a Pro Cycling Manager `.cdb` save file by name (case-insensitive partial match against both the full name and the short name). Returns up to 10 matching teams with their division name, country name, evaluation and general manager; `truncated` is true when more matches exist beyond the 10 returned.", inputSchema: { savePath: z.string().describe("Absolute path to the .cdb save file"), name: z @@ -65,10 +72,11 @@ export function registerSearchTeam(server: McpServer): void { LEFT JOIN STA_country c ON t.fkIDcountry = c.IDcountry WHERE LOWER(t.gene_sz_name) LIKE LOWER(:name) OR LOWER(t.gene_sz_shortname) LIKE LOWER(:name) - LIMIT 10`, + LIMIT ${MAX_RESULTS + 1}`, ); const teams: z.infer[] = []; + let truncated = false; try { const query = name.trim(); if (query.length === 0) { @@ -78,6 +86,10 @@ export function registerSearchTeam(server: McpServer): void { stmt.bind({ ":name": `%${query}%` }); while (stmt.step()) { + if (teams.length >= MAX_RESULTS) { + truncated = true; + break; + } const row = stmt.getAsObject(); teams.push({ id: Number(row.id), @@ -95,6 +107,7 @@ export function registerSearchTeam(server: McpServer): void { const output: z.infer = { teams, + truncated, }; return output; }), diff --git a/test/tools/__snapshots__/search-cyclist.test.ts.snap b/test/tools/__snapshots__/search-cyclist.test.ts.snap index ca4aa86..2fda3c8 100644 --- a/test/tools/__snapshots__/search-cyclist.test.ts.snap +++ b/test/tools/__snapshots__/search-cyclist.test.ts.snap @@ -214,6 +214,7 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 "timeTrial": 59, }, ], + "truncated": true, } `; @@ -431,6 +432,7 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 "timeTrial": 59, }, ], + "truncated": true, } `; @@ -648,6 +650,7 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 202 "timeTrial": 68, }, ], + "truncated": true, } `; @@ -865,5 +868,6 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 202 "timeTrial": 62, }, ], + "truncated": true, } `; diff --git a/test/tools/__snapshots__/search-team.test.ts.snap b/test/tools/__snapshots__/search-team.test.ts.snap index 9ae9736..74687e7 100644 --- a/test/tools/__snapshots__/search-team.test.ts.snap +++ b/test/tools/__snapshots__/search-team.test.ts.snap @@ -13,6 +13,7 @@ exports[`searchTeam > finds teams by name for Pro cycling manager 2018 1`] = ` "shortName": "Movistar", }, ], + "truncated": false, } `; @@ -29,6 +30,7 @@ exports[`searchTeam > finds teams by name for Pro cycling manager 2019 1`] = ` "shortName": "Movistar", }, ], + "truncated": false, } `; @@ -45,6 +47,7 @@ exports[`searchTeam > finds teams by name for Pro cycling manager 2021 1`] = ` "shortName": "Movistar", }, ], + "truncated": false, } `; @@ -61,5 +64,6 @@ exports[`searchTeam > finds teams by name for Pro cycling manager 2025 1`] = ` "shortName": "Movistar", }, ], + "truncated": false, } `; diff --git a/test/tools/search-cyclist.test.ts b/test/tools/search-cyclist.test.ts index 58594e6..a1511e2 100644 --- a/test/tools/search-cyclist.test.ts +++ b/test/tools/search-cyclist.test.ts @@ -29,6 +29,20 @@ describe("searchCyclist", () => { expect(result.structuredContent).toMatchSnapshot(); }); + it("caps results at 10 and flags truncation for a broad search", async () => { + const result = await mcp.callTool("pcm_search_cyclist", { + savePath: saveFixtures[0][1], + lastName: "a", + }); + + const output = result.structuredContent as { + cyclists: unknown[]; + truncated: boolean; + }; + expect(output.cyclists).toHaveLength(10); + expect(output.truncated).toBe(true); + }); + it("returns an error when neither name is provided", async () => { const result = await mcp.callTool("pcm_search_cyclist", { savePath: saveFixtures[0][1], diff --git a/test/tools/search-team.test.ts b/test/tools/search-team.test.ts index 449eeab..33e29a3 100644 --- a/test/tools/search-team.test.ts +++ b/test/tools/search-team.test.ts @@ -27,6 +27,20 @@ describe("searchTeam", () => { expect(result.structuredContent).toMatchSnapshot(); }); + it("caps results at 10 and flags truncation for a broad search", async () => { + const result = await mcp.callTool("pcm_search_team", { + savePath: saveFixtures[0][1], + name: "a", + }); + + const output = result.structuredContent as { + teams: unknown[]; + truncated: boolean; + }; + expect(output.teams).toHaveLength(10); + expect(output.truncated).toBe(true); + }); + it("returns an error when the name is empty", async () => { const result = await mcp.callTool("pcm_search_team", { savePath: saveFixtures[0][1], From d95c2e9a5b1f81c3d232b6a4bde6da80f296626e Mon Sep 17 00:00:00 2001 From: Mathieu Picciolli Date: Sun, 5 Jul 2026 10:12:13 -0400 Subject: [PATCH 2/5] test: assert no error in search results for cyclist and team tools --- test/tools/search-cyclist.test.ts | 1 + test/tools/search-team.test.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/test/tools/search-cyclist.test.ts b/test/tools/search-cyclist.test.ts index a1511e2..26e09ef 100644 --- a/test/tools/search-cyclist.test.ts +++ b/test/tools/search-cyclist.test.ts @@ -39,6 +39,7 @@ describe("searchCyclist", () => { cyclists: unknown[]; truncated: boolean; }; + expect(result.isError).toBe(false); expect(output.cyclists).toHaveLength(10); expect(output.truncated).toBe(true); }); diff --git a/test/tools/search-team.test.ts b/test/tools/search-team.test.ts index 33e29a3..ed5eb5d 100644 --- a/test/tools/search-team.test.ts +++ b/test/tools/search-team.test.ts @@ -37,6 +37,7 @@ describe("searchTeam", () => { teams: unknown[]; truncated: boolean; }; + expect(result.isError).toBe(false); expect(output.teams).toHaveLength(10); expect(output.truncated).toBe(true); }); From c4b1ce669387215e5473644db46029ac45875a9a Mon Sep 17 00:00:00 2001 From: Mathieu Picciolli Date: Sun, 5 Jul 2026 20:23:31 -0400 Subject: [PATCH 3/5] feat: add ordering to search results for cyclists and teams --- src/tools/search-cyclist.ts | 1 + src/tools/search-team.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/tools/search-cyclist.ts b/src/tools/search-cyclist.ts index 4babbb3..daad30b 100644 --- a/src/tools/search-cyclist.ts +++ b/src/tools/search-cyclist.ts @@ -80,6 +80,7 @@ export function registerSearchCyclist(server: McpServer): void { LEFT JOIN STA_country co ON r.fkIDcountry = co.IDcountry WHERE LOWER(c.gene_sz_lastname) LIKE LOWER(:lastName) AND LOWER(c.gene_sz_firstname) LIKE LOWER(:firstName) + ORDER BY c.gene_sz_lastname, c.gene_sz_firstname, c.IDcyclist LIMIT ${MAX_RESULTS + 1}`, ); diff --git a/src/tools/search-team.ts b/src/tools/search-team.ts index aebe037..886a7d6 100644 --- a/src/tools/search-team.ts +++ b/src/tools/search-team.ts @@ -72,6 +72,7 @@ export function registerSearchTeam(server: McpServer): void { LEFT JOIN STA_country c ON t.fkIDcountry = c.IDcountry WHERE LOWER(t.gene_sz_name) LIKE LOWER(:name) OR LOWER(t.gene_sz_shortname) LIKE LOWER(:name) + ORDER BY t.gene_sz_name, t.IDteam LIMIT ${MAX_RESULTS + 1}`, ); From 892d2bc676387b123f9eed081b6e52b85b650479 Mon Sep 17 00:00:00 2001 From: Mathieu Picciolli Date: Sun, 5 Jul 2026 20:29:23 -0400 Subject: [PATCH 4/5] feat: update search descriptions to include dynamic MAX_RESULTS value --- src/tools/search-cyclist.ts | 3 +-- src/tools/search-team.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tools/search-cyclist.ts b/src/tools/search-cyclist.ts index daad30b..1e8de56 100644 --- a/src/tools/search-cyclist.ts +++ b/src/tools/search-cyclist.ts @@ -36,8 +36,7 @@ export function registerSearchCyclist(server: McpServer): void { "pcm_search_cyclist", { title: "Search PCM cyclist by name", - description: - "Search for a cyclist in a Pro Cycling Manager `.cdb` save file by first name and/or last name (case-insensitive partial match). Returns up to 10 matching cyclists with all their ratings and their country name; `truncated` is true when more matches exist beyond the 10 returned.", + description: `Search for a cyclist in a Pro Cycling Manager \`.cdb\` save file by first name and/or last name (case-insensitive partial match). Returns up to ${MAX_RESULTS} matching cyclists with all their ratings and their country name; \`truncated\` is true when more matches exist beyond the ${MAX_RESULTS} returned.`, inputSchema: { savePath: z.string().describe("Absolute path to the .cdb save file"), firstName: z diff --git a/src/tools/search-team.ts b/src/tools/search-team.ts index 886a7d6..eb45746 100644 --- a/src/tools/search-team.ts +++ b/src/tools/search-team.ts @@ -38,8 +38,7 @@ export function registerSearchTeam(server: McpServer): void { "pcm_search_team", { title: "Search PCM team by name", - description: - "Search for a team in a Pro Cycling Manager `.cdb` save file by name (case-insensitive partial match against both the full name and the short name). Returns up to 10 matching teams with their division name, country name, evaluation and general manager; `truncated` is true when more matches exist beyond the 10 returned.", + description: `Search for a team in a Pro Cycling Manager \`.cdb\` save file by name (case-insensitive partial match against both the full name and the short name). Returns up to ${MAX_RESULTS} matching teams with their division name, country name, evaluation and general manager; \`truncated\` is true when more matches exist beyond the ${MAX_RESULTS} returned.`, inputSchema: { savePath: z.string().describe("Absolute path to the .cdb save file"), name: z From 4fabb152c2f06b63f9de4074d0049742bc77cc99 Mon Sep 17 00:00:00 2001 From: Mathieu Picciolli Date: Mon, 6 Jul 2026 07:50:23 -0400 Subject: [PATCH 5/5] test: remove unnecessary error check in search cyclist and team tests --- .../__snapshots__/search-cyclist.test.ts.snap | 866 +++++++++--------- test/tools/search-cyclist.test.ts | 1 - test/tools/search-team.test.ts | 1 - 3 files changed, 433 insertions(+), 435 deletions(-) diff --git a/test/tools/__snapshots__/search-cyclist.test.ts.snap b/test/tools/__snapshots__/search-cyclist.test.ts.snap index 3d09656..daa161a 100644 --- a/test/tools/__snapshots__/search-cyclist.test.ts.snap +++ b/test/tools/__snapshots__/search-cyclist.test.ts.snap @@ -4,46 +4,25 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 { "cyclists": [ { - "acceleration": 74, - "baroudeur": 65, - "cobble": 67, - "country": "Belgium", - "currentAbility": null, - "downhilling": 75, - "endurance": 68, - "firstName": "Tosh", - "hill": 74, - "id": 2548, - "lastName": "Van der Sande", - "mediumMountain": null, - "mountain": 62, - "plain": 72, - "prologue": 65, - "recuperation": 68, - "resistance": 67, - "sprint": 72, - "timeTrial": 65, - }, - { - "acceleration": 73, + "acceleration": 61, "baroudeur": 61, - "cobble": 65, + "cobble": 63, "country": "Netherlands", "currentAbility": null, - "downhilling": 67, - "endurance": 67, - "firstName": "Nick", - "hill": 72, - "id": 3396, - "lastName": "Van Der Lijke", + "downhilling": 63, + "endurance": 56, + "firstName": "Marijn", + "hill": 59, + "id": 6457, + "lastName": "Van Der Berg", "mediumMountain": null, - "mountain": 64, - "plain": 70, - "prologue": 67, - "recuperation": 67, - "resistance": 65, - "sprint": 68, - "timeTrial": 63, + "mountain": 55, + "plain": 62, + "prologue": 59, + "recuperation": 58, + "resistance": 56, + "sprint": 62, + "timeTrial": 57, }, { "acceleration": 65, @@ -88,25 +67,46 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 "timeTrial": 62, }, { - "acceleration": 72, + "acceleration": 64, + "baroudeur": 71, + "cobble": 51, + "country": "Netherlands", + "currentAbility": null, + "downhilling": 68, + "endurance": 56, + "firstName": "Bas", + "hill": 60, + "id": 6072, + "lastName": "Van Der Kooij", + "mediumMountain": null, + "mountain": 61, + "plain": 63, + "prologue": 59, + "recuperation": 56, + "resistance": 57, + "sprint": 57, + "timeTrial": 56, + }, + { + "acceleration": 73, "baroudeur": 61, - "cobble": 63, - "country": "Australia", + "cobble": 65, + "country": "Netherlands", "currentAbility": null, - "downhilling": 69, - "endurance": 65, - "firstName": "Neil", - "hill": 64, - "id": 3955, - "lastName": "Van Der Ploeg", + "downhilling": 67, + "endurance": 67, + "firstName": "Nick", + "hill": 72, + "id": 3396, + "lastName": "Van Der Lijke", "mediumMountain": null, - "mountain": 56, + "mountain": 64, "plain": 70, - "prologue": 69, - "recuperation": 66, - "resistance": 63, - "sprint": 70, - "timeTrial": 62, + "prologue": 67, + "recuperation": 67, + "resistance": 65, + "sprint": 68, + "timeTrial": 63, }, { "acceleration": 72, @@ -130,25 +130,46 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 "timeTrial": 60, }, { - "acceleration": 65, - "baroudeur": 68, - "cobble": 61, - "country": "Netherlands", + "acceleration": 72, + "baroudeur": 61, + "cobble": 63, + "country": "Australia", "currentAbility": null, - "downhilling": 65, - "endurance": 61, - "firstName": "Arno", - "hill": 60, - "id": 3995, - "lastName": "Van Der Zwet", + "downhilling": 69, + "endurance": 65, + "firstName": "Neil", + "hill": 64, + "id": 3955, + "lastName": "Van Der Ploeg", "mediumMountain": null, - "mountain": 55, - "plain": 69, - "prologue": 67, - "recuperation": 64, + "mountain": 56, + "plain": 70, + "prologue": 69, + "recuperation": 66, "resistance": 63, - "sprint": 64, - "timeTrial": 66, + "sprint": 70, + "timeTrial": 62, + }, + { + "acceleration": 62, + "baroudeur": 62, + "cobble": 60, + "country": "Netherlands", + "currentAbility": null, + "downhilling": 62, + "endurance": 56, + "firstName": "Danny", + "hill": 59, + "id": 6461, + "lastName": "Van Der Tuuk", + "mediumMountain": null, + "mountain": 56, + "plain": 62, + "prologue": 61, + "recuperation": 55, + "resistance": 56, + "sprint": 61, + "timeTrial": 61, }, { "acceleration": 61, @@ -172,46 +193,25 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 "timeTrial": 58, }, { - "acceleration": 64, - "baroudeur": 71, - "cobble": 51, - "country": "Netherlands", - "currentAbility": null, - "downhilling": 68, - "endurance": 56, - "firstName": "Bas", - "hill": 60, - "id": 6072, - "lastName": "Van Der Kooij", - "mediumMountain": null, - "mountain": 61, - "plain": 63, - "prologue": 59, - "recuperation": 56, - "resistance": 57, - "sprint": 57, - "timeTrial": 56, - }, - { - "acceleration": 52, - "baroudeur": 56, - "cobble": 57, + "acceleration": 65, + "baroudeur": 68, + "cobble": 61, "country": "Netherlands", "currentAbility": null, "downhilling": 65, - "endurance": 57, - "firstName": "Dennis", - "hill": 56, - "id": 6085, - "lastName": "van der Horst", + "endurance": 61, + "firstName": "Arno", + "hill": 60, + "id": 3995, + "lastName": "Van Der Zwet", "mediumMountain": null, - "mountain": 56, - "plain": 59, - "prologue": 59, - "recuperation": 52, - "resistance": 57, - "sprint": 59, - "timeTrial": 59, + "mountain": 55, + "plain": 69, + "prologue": 67, + "recuperation": 64, + "resistance": 63, + "sprint": 64, + "timeTrial": 66, }, ], "truncated": true, @@ -221,48 +221,6 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 2019 1`] = ` { "cyclists": [ - { - "acceleration": 74, - "baroudeur": 65, - "cobble": 68, - "country": "Belgium", - "currentAbility": null, - "downhilling": 75, - "endurance": 68, - "firstName": "Tosh", - "hill": 73, - "id": 2548, - "lastName": "Van der Sande", - "mediumMountain": null, - "mountain": 62, - "plain": 72, - "prologue": 65, - "recuperation": 68, - "resistance": 67, - "sprint": 72, - "timeTrial": 65, - }, - { - "acceleration": 74, - "baroudeur": 61, - "cobble": 65, - "country": "Netherlands", - "currentAbility": null, - "downhilling": 67, - "endurance": 69, - "firstName": "Nick", - "hill": 72, - "id": 3396, - "lastName": "Van Der Lijke", - "mediumMountain": null, - "mountain": 64, - "plain": 71, - "prologue": 67, - "recuperation": 67, - "resistance": 69, - "sprint": 70, - "timeTrial": 63, - }, { "acceleration": 65, "baroudeur": 66, @@ -284,6 +242,27 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 "sprint": 64, "timeTrial": 60, }, + { + "acceleration": 72, + "baroudeur": 61, + "cobble": 64, + "country": "Netherlands", + "currentAbility": null, + "downhilling": 75, + "endurance": 57, + "firstName": "Maik", + "hill": 60, + "id": 5920, + "lastName": "Van Der Heijden", + "mediumMountain": null, + "mountain": 54, + "plain": 65, + "prologue": 66, + "recuperation": 58, + "resistance": 59, + "sprint": 69, + "timeTrial": 64, + }, { "acceleration": 67, "baroudeur": 71, @@ -306,25 +285,46 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 "timeTrial": 62, }, { - "acceleration": 72, - "baroudeur": 61, - "cobble": 63, - "country": "Australia", + "acceleration": 76, + "baroudeur": 67, + "cobble": 65, + "country": "Netherlands", "currentAbility": null, - "downhilling": 69, - "endurance": 65, - "firstName": "Neil", - "hill": 64, - "id": 3955, - "lastName": "Van Der Ploeg", + "downhilling": 70, + "endurance": 66, + "firstName": "Bas", + "hill": 64, + "id": 6072, + "lastName": "Van Der Kooij", "mediumMountain": null, - "mountain": 56, + "mountain": 59, "plain": 70, - "prologue": 69, - "recuperation": 66, - "resistance": 63, + "prologue": 63, + "recuperation": 64, + "resistance": 64, + "sprint": 74, + "timeTrial": 59, + }, + { + "acceleration": 74, + "baroudeur": 61, + "cobble": 65, + "country": "Netherlands", + "currentAbility": null, + "downhilling": 67, + "endurance": 69, + "firstName": "Nick", + "hill": 72, + "id": 3396, + "lastName": "Van Der Lijke", + "mediumMountain": null, + "mountain": 64, + "plain": 71, + "prologue": 67, + "recuperation": 67, + "resistance": 69, "sprint": 70, - "timeTrial": 62, + "timeTrial": 63, }, { "acceleration": 72, @@ -348,26 +348,97 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 "timeTrial": 60, }, { - "acceleration": 65, - "baroudeur": 68, - "cobble": 61, + "acceleration": 72, + "baroudeur": 61, + "cobble": 63, + "country": "Australia", + "currentAbility": null, + "downhilling": 69, + "endurance": 65, + "firstName": "Neil", + "hill": 64, + "id": 3955, + "lastName": "Van Der Ploeg", + "mediumMountain": null, + "mountain": 56, + "plain": 70, + "prologue": 69, + "recuperation": 66, + "resistance": 63, + "sprint": 70, + "timeTrial": 62, + }, + { + "acceleration": 70, + "baroudeur": 70, + "cobble": 64, "country": "Netherlands", "currentAbility": null, - "downhilling": 65, - "endurance": 61, - "firstName": "Arno", - "hill": 60, - "id": 3995, - "lastName": "Van Der Zwet", + "downhilling": 75, + "endurance": 63, + "firstName": "David", + "hill": 66, + "id": 6765, + "lastName": "Van Der Poel", "mediumMountain": null, - "mountain": 55, + "mountain": 61, "plain": 69, "prologue": 67, - "recuperation": 64, - "resistance": 63, - "sprint": 64, - "timeTrial": 66, + "recuperation": 61, + "resistance": 64, + "sprint": 69, + "timeTrial": 63, + }, + { + "acceleration": 78, + "baroudeur": 69, + "cobble": 78, + "country": "Netherlands", + "currentAbility": null, + "downhilling": 84, + "endurance": 79, + "firstName": "Mathieu", + "hill": 79, + "id": 6764, + "lastName": "Van Der Poel", + "mediumMountain": null, + "mountain": 66, + "plain": 77, + "prologue": 77, + "recuperation": 69, + "resistance": 79, + "sprint": 78, + "timeTrial": 68, + }, + { + "acceleration": 62, + "baroudeur": 62, + "cobble": 60, + "country": "Netherlands", + "currentAbility": null, + "downhilling": 62, + "endurance": 57, + "firstName": "Danny", + "hill": 64, + "id": 6461, + "lastName": "Van Der Tuuk", + "mediumMountain": null, + "mountain": 62, + "plain": 62, + "prologue": 61, + "recuperation": 55, + "resistance": 57, + "sprint": 61, + "timeTrial": 61, }, + ], + "truncated": true, +} +`; + +exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 2021 1`] = ` +{ + "cyclists": [ { "acceleration": 72, "baroudeur": 61, @@ -390,25 +461,25 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 "timeTrial": 64, }, { - "acceleration": 61, - "baroudeur": 68, - "cobble": 56, + "acceleration": 69, + "baroudeur": 75, + "cobble": 72, "country": "Netherlands", "currentAbility": null, - "downhilling": 61, - "endurance": 58, - "firstName": "Mel", - "hill": 62, - "id": 6025, - "lastName": "Van Der Veekens", + "downhilling": 72, + "endurance": 70, + "firstName": "Taco", + "hill": 68, + "id": 3871, + "lastName": "Van Der Hoorn", "mediumMountain": null, "mountain": 59, - "plain": 64, - "prologue": 61, - "recuperation": 52, - "resistance": 56, - "sprint": 57, - "timeTrial": 58, + "plain": 76, + "prologue": 62, + "recuperation": 69, + "resistance": 69, + "sprint": 65, + "timeTrial": 62, }, { "acceleration": 76, @@ -426,40 +497,11 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 201 "mountain": 59, "plain": 70, "prologue": 63, - "recuperation": 64, + "recuperation": 69, "resistance": 64, "sprint": 74, "timeTrial": 59, }, - ], - "truncated": true, -} -`; - -exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 2021 1`] = ` -{ - "cyclists": [ - { - "acceleration": 75, - "baroudeur": 65, - "cobble": 73, - "country": "Belgium", - "currentAbility": null, - "downhilling": 75, - "endurance": 70, - "firstName": "Tosh", - "hill": 73, - "id": 2548, - "lastName": "Van der Sande", - "mediumMountain": null, - "mountain": 62, - "plain": 73, - "prologue": 65, - "recuperation": 68, - "resistance": 68, - "sprint": 73, - "timeTrial": 65, - }, { "acceleration": 69, "baroudeur": 61, @@ -481,27 +523,6 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 202 "sprint": 66, "timeTrial": 63, }, - { - "acceleration": 69, - "baroudeur": 75, - "cobble": 72, - "country": "Netherlands", - "currentAbility": null, - "downhilling": 72, - "endurance": 70, - "firstName": "Taco", - "hill": 68, - "id": 3871, - "lastName": "Van Der Hoorn", - "mediumMountain": null, - "mountain": 59, - "plain": 76, - "prologue": 62, - "recuperation": 69, - "resistance": 69, - "sprint": 65, - "timeTrial": 62, - }, { "acceleration": 72, "baroudeur": 69, @@ -524,88 +545,46 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 202 "timeTrial": 60, }, { - "acceleration": 72, - "baroudeur": 61, + "acceleration": 70, + "baroudeur": 70, "cobble": 64, "country": "Netherlands", "currentAbility": null, "downhilling": 75, - "endurance": 57, - "firstName": "Maik", - "hill": 60, - "id": 5920, - "lastName": "Van Der Heijden", - "mediumMountain": null, - "mountain": 54, - "plain": 65, - "prologue": 66, - "recuperation": 58, - "resistance": 59, - "sprint": 69, - "timeTrial": 64, - }, - { - "acceleration": 61, - "baroudeur": 68, - "cobble": 56, - "country": "Netherlands", - "currentAbility": null, - "downhilling": 61, - "endurance": 58, - "firstName": "Mel", - "hill": 62, - "id": 6025, - "lastName": "Van Der Veekens", - "mediumMountain": null, - "mountain": 59, - "plain": 64, - "prologue": 61, - "recuperation": 52, - "resistance": 56, - "sprint": 57, - "timeTrial": 58, - }, - { - "acceleration": 76, - "baroudeur": 67, - "cobble": 65, - "country": "Netherlands", - "currentAbility": null, - "downhilling": 70, - "endurance": 66, - "firstName": "Bas", - "hill": 64, - "id": 6072, - "lastName": "Van Der Kooij", + "endurance": 63, + "firstName": "David", + "hill": 66, + "id": 6765, + "lastName": "Van Der Poel", "mediumMountain": null, - "mountain": 59, - "plain": 70, - "prologue": 63, - "recuperation": 69, + "mountain": 61, + "plain": 69, + "prologue": 67, + "recuperation": 61, "resistance": 64, - "sprint": 74, - "timeTrial": 59, + "sprint": 69, + "timeTrial": 63, }, { - "acceleration": 64, - "baroudeur": 66, - "cobble": 61, + "acceleration": 84, + "baroudeur": 69, + "cobble": 82, "country": "Netherlands", "currentAbility": null, - "downhilling": 65, - "endurance": 59, - "firstName": "Dennis", - "hill": 64, - "id": 6085, - "lastName": "Van der Horst", + "downhilling": 84, + "endurance": 82, + "firstName": "Mathieu", + "hill": 80, + "id": 6764, + "lastName": "Van Der Poel", "mediumMountain": null, - "mountain": 57, - "plain": 67, - "prologue": 61, - "recuperation": 62, - "resistance": 59, - "sprint": 66, - "timeTrial": 61, + "mountain": 65, + "plain": 83, + "prologue": 77, + "recuperation": 70, + "resistance": 81, + "sprint": 79, + "timeTrial": 68, }, { "acceleration": 62, @@ -629,25 +608,46 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 202 "timeTrial": 63, }, { - "acceleration": 84, - "baroudeur": 69, - "cobble": 82, + "acceleration": 61, + "baroudeur": 68, + "cobble": 56, "country": "Netherlands", "currentAbility": null, - "downhilling": 84, - "endurance": 82, - "firstName": "Mathieu", - "hill": 80, - "id": 6764, - "lastName": "Van Der Poel", + "downhilling": 61, + "endurance": 58, + "firstName": "Mel", + "hill": 62, + "id": 6025, + "lastName": "Van Der Veekens", "mediumMountain": null, - "mountain": 65, - "plain": 83, - "prologue": 77, - "recuperation": 70, - "resistance": 81, - "sprint": 79, - "timeTrial": 68, + "mountain": 59, + "plain": 64, + "prologue": 61, + "recuperation": 52, + "resistance": 56, + "sprint": 57, + "timeTrial": 58, + }, + { + "acceleration": 55, + "baroudeur": 55, + "cobble": 55, + "country": "Belgium", + "currentAbility": null, + "downhilling": 55, + "endurance": 55, + "firstName": "Aaron", + "hill": 55, + "id": 7605, + "lastName": "Van der Beken", + "mediumMountain": null, + "mountain": 55, + "plain": 55, + "prologue": 55, + "recuperation": 55, + "resistance": 55, + "sprint": 55, + "timeTrial": 55, }, ], "truncated": true, @@ -658,25 +658,46 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 202 { "cyclists": [ { - "acceleration": 68, + "acceleration": 66, "baroudeur": 65, - "cobble": 72, + "cobble": 60, "country": "Belgium", "currentAbility": 0, - "downhilling": 75, - "endurance": 65, - "firstName": "Tosh", - "hill": 70, - "id": 2548, - "lastName": "Van Der Sande", - "mediumMountain": 67, - "mountain": 64, - "plain": 71, - "prologue": 65, + "downhilling": 65, + "endurance": 64, + "firstName": "Aaron", + "hill": 68, + "id": 7605, + "lastName": "Van Der Beken", + "mediumMountain": 68, + "mountain": 66, + "plain": 64, + "prologue": 57, "recuperation": 68, - "resistance": 66, - "sprint": 68, - "timeTrial": 65, + "resistance": 63, + "sprint": 60, + "timeTrial": 57, + }, + { + "acceleration": 56, + "baroudeur": 67, + "cobble": 57, + "country": "Netherlands", + "currentAbility": 0, + "downhilling": 60, + "endurance": 56, + "firstName": "Niels", + "hill": 54, + "id": 7503, + "lastName": "Van Der Gracht", + "mediumMountain": 52, + "mountain": 50, + "plain": 63, + "prologue": 56, + "recuperation": 57, + "resistance": 53, + "sprint": 57, + "timeTrial": 58, }, { "acceleration": 69, @@ -699,27 +720,6 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 202 "sprint": 65, "timeTrial": 62, }, - { - "acceleration": 72, - "baroudeur": 69, - "cobble": 65, - "country": "Netherlands", - "currentAbility": 0, - "downhilling": 63, - "endurance": 62, - "firstName": "Nick", - "hill": 59, - "id": 3968, - "lastName": "Van Der Meer", - "mediumMountain": 57, - "mountain": 54, - "plain": 69, - "prologue": 63, - "recuperation": 61, - "resistance": 62, - "sprint": 70, - "timeTrial": 60, - }, { "acceleration": 64, "baroudeur": 66, @@ -742,25 +742,46 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 202 "timeTrial": 61, }, { - "acceleration": 61, - "baroudeur": 64, + "acceleration": 58, + "baroudeur": 72, "cobble": 64, - "country": "Poland", + "country": "Netherlands", "currentAbility": 0, - "downhilling": 65, - "endurance": 60, - "firstName": "Danny", + "downhilling": 68, + "endurance": 59, + "firstName": "Jardi", "hill": 66, - "id": 6461, - "lastName": "Van Der Tuuk", - "mediumMountain": 64, - "mountain": 62, - "plain": 67, - "prologue": 65, - "recuperation": 63, + "id": 8321, + "lastName": "Van Der Lee", + "mediumMountain": 65, + "mountain": 65, + "plain": 66, + "prologue": 62, + "recuperation": 60, "resistance": 61, - "sprint": 60, - "timeTrial": 65, + "sprint": 59, + "timeTrial": 62, + }, + { + "acceleration": 72, + "baroudeur": 69, + "cobble": 65, + "country": "Netherlands", + "currentAbility": 0, + "downhilling": 63, + "endurance": 62, + "firstName": "Nick", + "hill": 59, + "id": 3968, + "lastName": "Van Der Meer", + "mediumMountain": 57, + "mountain": 54, + "plain": 69, + "prologue": 63, + "recuperation": 61, + "resistance": 62, + "sprint": 70, + "timeTrial": 60, }, { "acceleration": 81, @@ -784,46 +805,46 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 202 "timeTrial": 75, }, { - "acceleration": 56, - "baroudeur": 67, - "cobble": 57, - "country": "Netherlands", + "acceleration": 68, + "baroudeur": 65, + "cobble": 72, + "country": "Belgium", "currentAbility": 0, - "downhilling": 60, - "endurance": 56, - "firstName": "Niels", - "hill": 54, - "id": 7503, - "lastName": "Van Der Gracht", - "mediumMountain": 52, - "mountain": 50, - "plain": 63, - "prologue": 56, - "recuperation": 57, - "resistance": 53, - "sprint": 57, - "timeTrial": 58, + "downhilling": 75, + "endurance": 65, + "firstName": "Tosh", + "hill": 70, + "id": 2548, + "lastName": "Van Der Sande", + "mediumMountain": 67, + "mountain": 64, + "plain": 71, + "prologue": 65, + "recuperation": 68, + "resistance": 66, + "sprint": 68, + "timeTrial": 65, }, { - "acceleration": 66, - "baroudeur": 65, - "cobble": 60, - "country": "Belgium", + "acceleration": 61, + "baroudeur": 64, + "cobble": 64, + "country": "Poland", "currentAbility": 0, "downhilling": 65, - "endurance": 64, - "firstName": "Aaron", - "hill": 68, - "id": 7605, - "lastName": "Van Der Beken", - "mediumMountain": 68, - "mountain": 66, - "plain": 64, - "prologue": 57, - "recuperation": 68, - "resistance": 63, + "endurance": 60, + "firstName": "Danny", + "hill": 66, + "id": 6461, + "lastName": "Van Der Tuuk", + "mediumMountain": 64, + "mountain": 62, + "plain": 67, + "prologue": 65, + "recuperation": 63, + "resistance": 61, "sprint": 60, - "timeTrial": 57, + "timeTrial": 65, }, { "acceleration": 65, @@ -846,27 +867,6 @@ exports[`searchCyclist > finds cyclists by last name for Pro cycling manager 202 "sprint": 64, "timeTrial": 63, }, - { - "acceleration": 58, - "baroudeur": 72, - "cobble": 64, - "country": "Netherlands", - "currentAbility": 0, - "downhilling": 68, - "endurance": 59, - "firstName": "Jardi", - "hill": 66, - "id": 8321, - "lastName": "Van Der Lee", - "mediumMountain": 65, - "mountain": 65, - "plain": 66, - "prologue": 62, - "recuperation": 60, - "resistance": 61, - "sprint": 59, - "timeTrial": 62, - }, ], "truncated": true, } diff --git a/test/tools/search-cyclist.test.ts b/test/tools/search-cyclist.test.ts index 26e09ef..a1511e2 100644 --- a/test/tools/search-cyclist.test.ts +++ b/test/tools/search-cyclist.test.ts @@ -39,7 +39,6 @@ describe("searchCyclist", () => { cyclists: unknown[]; truncated: boolean; }; - expect(result.isError).toBe(false); expect(output.cyclists).toHaveLength(10); expect(output.truncated).toBe(true); }); diff --git a/test/tools/search-team.test.ts b/test/tools/search-team.test.ts index ed5eb5d..33e29a3 100644 --- a/test/tools/search-team.test.ts +++ b/test/tools/search-team.test.ts @@ -37,7 +37,6 @@ describe("searchTeam", () => { teams: unknown[]; truncated: boolean; }; - expect(result.isError).toBe(false); expect(output.teams).toHaveLength(10); expect(output.truncated).toBe(true); });