Skip to content
Merged
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 .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "8.1.1"
".": "8.2.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 46
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-ded87cb73affcaff9cf779d9cfd119a4026cfc1757b39be95d933edea48a0328.yml
openapi_spec_hash: 0e6394b222fc68d7607114e70b72d23e
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-46f433f34d440aa1dfcc48cc8d822c598571b68be2f723ec99e1b4fba6c13b1e.yml
openapi_spec_hash: 5b5cd728776723ac773900f7e8a32c05
config_hash: 0892e2e0eeb0343a022afa62e9080dd1
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 8.2.0 (2026-01-13)

Full Changelog: [v8.1.1...v8.2.0](https://github.com/Finch-API/finch-api-node/compare/v8.1.1...v8.2.0)

### Features

* **api:** api update ([07174ee](https://github.com/Finch-API/finch-api-node/commit/07174eed580ea7be80172df97f7de41fc9bf09fd))


### Bug Fixes

* **mcp:** fix env parsing ([da539c1](https://github.com/Finch-API/finch-api-node/commit/da539c18318057054f9f7a6e39a8d8a8c62ef04b))
* **mcp:** fix options parsing ([50db4af](https://github.com/Finch-API/finch-api-node/commit/50db4af071d340114f0e129d4843fd92be84d391))
* **mcp:** update code tool prompt ([f3b178b](https://github.com/Finch-API/finch-api-node/commit/f3b178b2683dd7f86bba4034e5d8baf7db0e52fe))


### Chores

* fix typo in descriptions ([3ea6c6f](https://github.com/Finch-API/finch-api-node/commit/3ea6c6fd84e2db27791d5e01e3841c383713cf6e))
* **internal:** codegen related update ([2fc7cb3](https://github.com/Finch-API/finch-api-node/commit/2fc7cb3ba446371be9d018a2625039e95e850b26))
* **internal:** codegen related update ([65d66db](https://github.com/Finch-API/finch-api-node/commit/65d66db7811483626e17ad740b7740467948b066))
* **internal:** codegen related update ([36d593e](https://github.com/Finch-API/finch-api-node/commit/36d593ed51b766a5493fa07ff38e7123f6b2ccac))
* **internal:** codegen related update ([55094b0](https://github.com/Finch-API/finch-api-node/commit/55094b0eac5fff043ca2a0e177843a7eb8a73c97))

## 8.1.1 (2026-01-06)

Full Changelog: [v8.1.0...v8.1.1](https://github.com/Finch-API/finch-api-node/compare/v8.1.0...v8.1.1)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryfinch/finch-api",
"version": "8.1.1",
"version": "8.2.0",
"description": "The official TypeScript library for the Finch API",
"author": "Finch <founders@tryfinch.com>",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryfinch/finch-api-mcp",
"version": "8.1.1",
"version": "8.2.0",
"description": "The official MCP Server for the Finch API",
"author": "Finch <founders@tryfinch.com>",
"types": "dist/index.d.ts",
Expand Down
26 changes: 23 additions & 3 deletions packages/mcp-server/src/code-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@ import { McpTool, Metadata, ToolCallResult, asErrorResult, asTextContentResult }
import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { readEnv } from './server';
import { WorkerInput, WorkerOutput } from './code-tool-types';

const prompt = `Runs JavaScript code to interact with the Finch API.

You are a skilled programmer writing code to interface with the service.
Define an async function named "run" that takes a single parameter of an initialized SDK client and it will be run.
For example:

\`\`\`
async function run(client) {
const page = await client.hris.directory.list();
const individualInDirectory = page.individuals[0]

console.log(individualInDirectory.id);
}
\`\`\`

You will be returned anything that your function returns, plus the results of any console.log statements.
Do not add try-catch blocks for single API calls. The tool will handle errors for you.
Do not add comments unless necessary for generating better code.
Code will run in a container, and cannot interact with the network outside of the given SDK client.
Variables will not persist between calls, so make sure to return or log any data you might need later.`;

/**
* A tool that runs code against a copy of the SDK.
*
Expand All @@ -17,8 +39,7 @@ export function codeTool(): McpTool {
const metadata: Metadata = { resource: 'all', operation: 'write', tags: [] };
const tool: Tool = {
name: 'execute',
description:
'Runs JavaScript code to interact with the API.\n\nYou are a skilled programmer writing code to interface with the service.\nDefine an async function named "run" that takes a single parameter of an initialized SDK client and it will be run.\nWrite code within this template:\n\n```\nasync function run(client) {\n // Fill this out\n}\n```\n\nYou will be returned anything that your function returns, plus the results of any console.log statements.\nIf any code triggers an error, the tool will return an error response, so you do not need to add error handling unless you want to output something more helpful than the raw error.\nIt is not necessary to add comments to code, unless by adding those comments you believe that you can generate better code.\nThis code will run in a container, and you will not be able to use fetch or otherwise interact with the network calls other than through the client you are given.\nAny variables you define won\'t live between successive uses of this call, so make sure to return or log any data you might need later.',
description: prompt,
inputSchema: { type: 'object', properties: { code: { type: 'string' } } },
};
const handler = async (_: unknown, args: any): Promise<ToolCallResult> => {
Expand All @@ -36,7 +57,6 @@ export function codeTool(): McpTool {
...(stainlessAPIKey && { Authorization: stainlessAPIKey }),
'Content-Type': 'application/json',
client_envs: JSON.stringify({
FINCH_ACCESS_TOKEN: readEnv('FINCH_ACCESS_TOKEN'),
FINCH_CLIENT_ID: readEnv('FINCH_CLIENT_ID'),
FINCH_CLIENT_SECRET: readEnv('FINCH_CLIENT_SECRET'),
FINCH_WEBHOOK_SECRET: readEnv('FINCH_WEBHOOK_SECRET'),
Expand Down
4 changes: 2 additions & 2 deletions packages/mcp-server/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function parseCLIOptions(): CLIOptions {
const transport = argv.transport as 'stdio' | 'http';

return {
includeDocsTools,
...(includeDocsTools !== undefined && { includeDocsTools }),
transport,
port: argv.port,
socket: argv.socket,
Expand Down Expand Up @@ -87,6 +87,6 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M
: defaultOptions.includeDocsTools;

return {
includeDocsTools: docsTools,
...(docsTools !== undefined && { includeDocsTools: docsTools }),
};
}
2 changes: 1 addition & 1 deletion packages/mcp-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const newMcpServer = () =>
new McpServer(
{
name: 'tryfinch_finch_api_api',
version: '8.1.1',
version: '8.2.0',
},
{ capabilities: { tools: {}, logging: {} } },
);
Expand Down
8 changes: 4 additions & 4 deletions packages/mcp-server/tests/options.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('parseCLIOptions', () => {
const result = parseCLIOptions();

expect(result.transport).toBe('http');
expect(result.port).toBe('2222');
expect(result.port).toBe(2222);
cleanup();
});
});
Expand All @@ -38,13 +38,13 @@ describe('parseQueryOptions', () => {
const query = '';
const result = parseQueryOptions(defaultOptions, query);

expect(result).toBe({});
expect(result).toEqual({});
});

it('should handle invalid query string gracefully', () => {
const query = 'invalid=value&operation=invalid-operation';
const query = 'invalid=value&tools=invalid-operation';

// Should throw due to Zod validation for invalid operation
// Should throw due to Zod validation for invalid tools
expect(() => parseQueryOptions(defaultOptions, query)).toThrow();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ export class PayStatementItem extends APIResource {
rules: RulesAPI.Rules = new RulesAPI.Rules(this._client);

/**
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
* historical support will be added soon Retrieve a list of detailed pay statement
* items for the access token's connection account.
* Retrieve a list of detailed pay statement items for the access token's
* connection account.
*
* @example
* ```ts
Expand Down
23 changes: 9 additions & 14 deletions src/resources/hris/company/pay-statement-item/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import { path } from '../../../../internal/utils/path';

export class Rules extends APIResource {
/**
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
* historical support will be added soon Custom rules can be created to associate
* specific attributes to pay statement items depending on the use case. For
* example, pay statement items that meet certain conditions can be labeled as a
* pre-tax 401k. This metadata can be retrieved where pay statement item
* information is available.
* Custom rules can be created to associate specific attributes to pay statement
* items depending on the use case. For example, pay statement items that meet
* certain conditions can be labeled as a pre-tax 401k. This metadata can be
* retrieved where pay statement item information is available.
*
* @example
* ```ts
Expand All @@ -34,8 +32,7 @@ export class Rules extends APIResource {
}

/**
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
* historical support will be added soon Update a rule for a pay statement item.
* Update a rule for a pay statement item.
*
* @example
* ```ts
Expand All @@ -59,8 +56,7 @@ export class Rules extends APIResource {
}

/**
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
* historical support will be added soon List all rules of a connection account.
* List all rules of a connection account.
*
* @example
* ```ts
Expand All @@ -81,8 +77,7 @@ export class Rules extends APIResource {
}

/**
* **Beta:** this endpoint currently serves employers onboarded after March 4th and
* historical support will be added soon Delete a rule for a pay statement item.
* Delete a rule for a pay statement item.
*
* @example
* ```ts
Expand Down Expand Up @@ -420,7 +415,7 @@ export interface RuleCreateParams {
attributes?: RuleCreateParams.Attributes;

/**
* Body param:
* Body param
*/
conditions?: Array<RuleCreateParams.Condition>;

Expand Down Expand Up @@ -478,7 +473,7 @@ export interface RuleUpdateParams {
entity_ids?: Array<string>;

/**
* Body param:
* Body param
*/
optionalProperty?: unknown;
}
Expand Down
3 changes: 1 addition & 2 deletions src/resources/hris/employments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ export namespace EmploymentData {
employment: UnionMember0.Employment | null;

/**
* The detailed employment status of the individual. Available options: `active`,
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
* The detailed employment status of the individual.
*/
employment_status:
| 'active'
Expand Down
4 changes: 2 additions & 2 deletions src/resources/hris/individuals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,12 @@ export interface IndividualRetrieveManyParams {
entity_ids?: Array<string>;

/**
* Body param:
* Body param
*/
options?: IndividualRetrieveManyParams.Options | null;

/**
* Body param:
* Body param
*/
requests?: Array<IndividualRetrieveManyParams.Request>;
}
Expand Down
4 changes: 2 additions & 2 deletions src/resources/hris/payments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ export namespace Payment {
export interface PaymentListParams {
/**
* The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
* format.
* format. Filters payments by their **pay_date** field.
*/
end_date: string;

/**
* The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD`
* format.
* format. Filters payments by their **pay_date** field.
*/
start_date: string;

Expand Down
4 changes: 2 additions & 2 deletions src/resources/jobs/manual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { path } from '../../internal/utils/path';

export class Manual extends APIResource {
/**
* Get a manual job by `job_id`. Manual jobs are completed by a human and include
* Assisted Benefits jobs.
* Check the status and outcome of a job by `job_id`. This includes all deductions
* jobs including those for both automated and assisted integrations.
*/
retrieve(jobID: string, options?: RequestOptions): APIPromise<ManualAsyncJob> {
return this._client.get(path`/jobs/manual/${jobID}`, options);
Expand Down
3 changes: 1 addition & 2 deletions src/resources/sandbox/directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ export namespace DirectoryCreateParams {
employment?: Body.Employment | null;

/**
* The detailed employment status of the individual. Available options: `active`,
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
* The detailed employment status of the individual.
*/
employment_status?:
| 'active'
Expand Down
6 changes: 2 additions & 4 deletions src/resources/sandbox/employment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ export interface EmploymentUpdateResponse {
employment?: EmploymentUpdateResponse.Employment | null;

/**
* The detailed employment status of the individual. Available options: `active`,
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
* The detailed employment status of the individual.
*/
employment_status?:
| 'active'
Expand Down Expand Up @@ -192,8 +191,7 @@ export interface EmploymentUpdateParams {
employment?: EmploymentUpdateParams.Employment | null;

/**
* The detailed employment status of the individual. Available options: `active`,
* `deceased`, `leave`, `onboarding`, `prehire`, `retired`, `terminated`.
* The detailed employment status of the individual.
*/
employment_status?:
| 'active'
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '8.1.1'; // x-release-please-version
export const VERSION = '8.2.0'; // x-release-please-version