npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cardor/bills-sri

v2.0.1

Published

Bills SRI is a Node.js package designed to facilitate the management and automation of bill files, including listing, renaming, reading, moving, and copying bill files. It provides a set of tools and prompts for workflow automation, ideal for integration

Downloads

29

Readme

Bills SRI

Bills SRI is a Node.js package designed to facilitate the management and automation of bill files, including listing, renaming, reading, moving, and copying bill files. It provides a set of tools and prompts for workflow automation, ideal for integration with MCP (Model Context Protocol) servers.


Tools

1. list-bill-files

  • Description: Lists files associated with a bill in a given folder.
  • Input Schema:
    {
      "sourcePath": "string",   // Path to the folder with bill files
      "targetPath": "string"    // (Optional) Path where the listed files will be saved
    }
  • Output Schema:
    {
      "success": true,
      "error": null,
      "filesPath": ["string", ...] // Array of file paths found
    }
    or on error:
    {
      "success": false,
      "error": "Error message",
      "filesPath": []
    }

2. rename-bill-files

  • Description: Renames files associated with a bill.
  • Input Schema:
    {
      "filesData": [
        {
          "oldPath": "string", // Current file path
          "newPath": "string"  // New file path
        }
      ]
    }
  • Output Schema:
    {
      "success": true,
      "error": null,
      "filesData": [
        {
          "oldPath": "string",
          "newPath": "string"
        }
      ]
    }
    or on error:
    {
      "success": false,
      "error": "Error message",
      "filesData": []
    }

3. read-bill-files

  • Description: Reads and parses content from bill PDF files in a folder.
  • Input Schema:
    {
      "sourcePath": "string" // Path to the folder with bill files
    }
  • Output Schema:
    {
      "success": true,
      "error": null,
      "files": [
        {
          "content": "string", // Extracted text content from PDF
          "path": "string",    // File path
          "name": "string"     // File name
        }
      ]
    }
    or on error:
    {
      "success": false,
      "error": "Error message",
      "files": []
    }

4. move-bill-files

  • Description: Moves files associated with a bill to a new location.
  • Input Schema:
    {
      "filesData": [
        {
          "oldPath": "string", // Current file path
          "newPath": "string"  // New file path
        }
      ]
    }
  • Output Schema:
    (Igual que rename-bill-files)

5. copy-bill-files

  • Description: Copies files associated with a bill to a new location.
  • Input Schema:
    (Igual que move-bill-files)
  • Output Schema:
    (Igual que move-bill-files)

6. analyze-bill-files

  • Description: Analyzes bill files and generates a prompt instruction based on guidelines.
  • Input Schema:
    {
      "filesPath": ["string", ...], // Array of file paths to analyze
      "guidelinesPrompt": "string" // Text, path or URL to guidelines for analysis
    }
  • The guidelinesPrompt can be a text string, a file path, or a URL pointing to the guidelines for analyzing the bill files. You can also set it via the environment variable BILLS_ANALYZE_GUIDELINES. Examples:
    • Text: "Analyze the bill files based on the following guidelines..."
    • File path: file:<absolute-path-to-guidelines>
    • URL: http://example.com/guidelines.pdf, https://example.com/guidelines.txt or https://example.com/guidelines.md
  • Output Schema:
    {
      "success": true,
      "error": null,
      "promptInstruction": "string" // Generated prompt for further processing
    }
    or on error:
    {
      "success": false,
      "error": "Error message",
      "promptInstruction": ""
    }

Prompts

1. rename-bill-files

  • Description: Generates a prompt to rename bill files from a folder workflow.
  • Args Schema: GenerateRenameBillFilesPromptRaw
  • Input Example:
    { "sourcePath": "/path/to/bill/files" }
  • Output: Prompt instructing the workflow to:
    1. List all files and their content using read-bill-files.
    2. Analyze PDF content to determine BILL NUMBER.
    3. Rename files using rename-bill-files, prefixing filenames with the BILL NUMBER.

2. list-bill-files

  • Description: Generates a prompt to list bill files from a folder workflow.
  • Args Schema: InputListBillFilesRaw
  • Input Example:
    { "sourcePath": "/path/to/bill/files" }
  • Output: Prompt instructing the workflow to list all files using list-bill-files and return file names in JSON format.

3. copy-move-bill-files

  • Description: Generates a prompt to move or copy bill files from a folder workflow.
  • Args Schema: CopyAndMoveBillFilesRaw
  • Input Example:
    { "sourcePath": "/path/to/bill/files", "action": "copy" }
  • Output: Prompt instructing the workflow to list files and move/copy them to a new location using the appropriate tool.

Usage

Command (NPM)

  1. Install dependencies:
    pnpm install -g @cardor/bills-sri
  2. Add the configuration to your MCP client:
    "bills-sri": {
      "type": "stdio",
      "command": "cardor-bills-sri",
      "env": {
        // Could be a text, file path or URL
        "BILLS_ANALYZE_GUIDELINES": "file://path/to/guidelines"
      }
    }

Command (With Docker)

  1. Clone the repository:
    git clone <repository-url>
  2. Build the Docker image:
    pnpm run docker:build
  3. Add the configuration to your MCP client:
    "bills-sri-dock": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "BILLS_ANALYZE_GUIDELINES=file://path/to/guidelines",
        "bills-sri"
      ]
    }

Stream HTTP requests

  1. Clone the repository:
    git clone <repository-url>
  2. Install dependencies:
    pnpm install
  3. Build the MCP:
    pnpm run build
  4. Start the MCP:
    pnpm run start
  5. Use the MCP server at http://localhost:5555/mcp

Example: Using a Tool via HTTP

POST /mcp/tool/list-bill-files

{
  "sourcePath": "/Users/jolyne/Downloads/BillsSource",
  "targetPath": "/Users/jolyne/Downloads/BillsTarget"
}

POST /mcp/prompt/rename-bill-files

{
  "sourcePath": "/Users/jolyne/Downloads/BillsSource"
}

Schemas

  • InputListBillFilesRaw:
    { "sourcePath": "string", "targetPath": "string" }
  • InputRenameBillFilesRaw:
    { "filesData": [{ "oldPath": "string", "newPath": "string" }] }
  • GenerateRenameBillFilesPromptRaw:
    { "sourcePath": "string" }
  • CopyAndMoveBillFilesRaw:
    { "sourcePath": "string", "action": "copy" // "move" }