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

@equationalapplications/core-llm-tools

v4.11.0

Published

Zero-dependency Gemini function-calling schemas and capability-scoped tool injection for edge AI agents. Works in Node.js, browser, and React Native (Hermes).

Readme

@equationalapplications/core-llm-tools

Zero-dependency Gemini function-calling schemas and capability-scoped tool injection for edge AI agents. Works in Node.js, browser, and React Native (Hermes).

npm version npm downloads TypeScript License: MIT

GitHub · ScopeLab · WikiDemo · Changelog · Issues

A universal registry bridging the gap between Edge AI (Expo/React Native) and Cloud Agents (Cloud Run).

Overview

core-llm-tools provides a shared, strictly-typed repository of JSON Function Declarations (Tools) for Gemini models. By decoupling the Tool Interface (the schema) from the Tool Implementation (the executing code), this package allows client-side triage agents and heavy backend cloud agents to share the exact same capabilities without importing Node.js server dependencies into the browser or mobile environments.

It also introduces a robust Capability-Based Scope Model (similar to OAuth 2.0), ensuring that Large Language Models are only injected with tools the user has explicitly authorized.

Features

  • Platform-Agnostic — Zero runtime dependencies. Pure TypeScript. Compiles safely for Node.js, the browser, and the React Native Hermes engine.
  • Capability-Based Security — Tools are locked behind specific scopes (e.g., calendar:read, messages:send). The injector ensures models cannot hallucinate calls to unauthorized tools.
  • Strict Typings — Provides rigid interfaces (AgentToolSchema, AgentToolManifest) to prevent malformed Gemini API requests.
  • Harmonized Edge/Cloud Routing — Enables lightweight edge models (like Gemini Nano) to triage intents using the exact same schemas the heavy Cloud Run backend uses to execute them.

Installation

npm install @equationalapplications/core-llm-tools
# or
pnpm add @equationalapplications/core-llm-tools

Quick Start

1. Defining a Tool Manifest

Tools are defined by wrapping a standard Gemini JSON schema with a required security scope.

import type { AgentToolManifest } from '@equationalapplications/core-llm-tools';

export const getCalendarEventsManifest: AgentToolManifest = {
  name: 'get_calendar_events',
  scope: 'calendar:read', // Security scope required to use this tool
  schema: {
    name: 'get_calendar_events',
    description: 'Fetch the user\'s schedule for a given date.',
    parameters: {
      type: 'object',
      properties: {
        date: { type: 'string' }
      }
    }
  }
};

2. Injecting Authorized Tools

At runtime, use buildAuthorizedSchemaArray to filter your tool library against the user's granted permissions before passing them to the LLM.

import { buildAuthorizedSchemaArray, escalateToCloudManifest } from '@equationalapplications/core-llm-tools';

// 1. Gather all manifests known to your app
const allAppTools = [escalateToCloudManifest, getCalendarEventsManifest];

// 2. Fetch the user's authorized scopes from your DB (e.g., SQLite/Postgres)
const userGrantedScopes = ['calendar:read'];

// 3. The injector automatically includes 'core' tools and authorized scoped tools
const schemasForLlm = buildAuthorizedSchemaArray(allAppTools, userGrantedScopes);

// 4. Pass safely to Gemini
const response = await ai.models.generateContent({
  model: 'gemini-2.5-flash',
  contents: userInput,
  tools: [{ functionDeclarations: schemasForLlm }],
});

Helpful Resources & Links

Monorepo Ecosystem

| Package | Description | |---------|-------------| | @equationalapplications/core-llm-wiki | Pure TypeScript core — DB-agnostic, bring your own SQLite adapter | | @equationalapplications/expo-llm-wiki | Expo / React Native adapter with expo-sqlite | | @equationalapplications/react-llm-wiki | React hooks + web adapter with sql.js | | @equationalapplications/prisma-outbox | Sync SQLite outbox events to Prisma in a transaction | | @equationalapplications/core-llm-tools | Platform-agnostic Gemini tool schemas + capability scope injector |


Made with ❤️ by Equational Applications LLC. https://equationalapplications.com/