fund
Display funding details for installed npm packages to support open-source development. Check specific packages or all dependencies in a project directory.
Instructions
Show funding information for installed packages
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to the package directory | |
| package | No | Specific package to check |
Implementation Reference
- src/index.ts:720-740 (handler)Implementation of the "fund" tool, which runs `npm fund` on the specified path and returns the JSON output.
server.tool( "fund", "Show funding information for installed packages", { path: z.string().describe("Absolute path to the package directory"), package: z.string().optional().describe("Specific package to check"), }, async ({ path, package: pkg }) => { const args = ["fund", "--json"]; if (pkg) args.push(pkg); try { const { stdout } = await run(args, path); return { content: [{ type: "text", text: stdout }] }; } catch (e: any) { return { content: [{ type: "text", text: `Error: ${e.stderr || e.message}` }], isError: true, }; } }, );