API Reference
Complete API documentation for all WebMCP Tooling Suite packages.
Format Support
Full Support for Both Formats
All APIs fully support both LLMFeed JSON (.llmfeed.json) and llms.txt formats. Use the appropriate package for each format.
Overview
Each package exports a set of functions, classes, and types. This reference covers all public APIs.
Validator API
validateFeedStructure, validateLLMFeed, verifyEd25519Signature, and more
Signer API
generateKeyPair, signFeed, verifyFeed, loadKeyPair, and more
Health Monitor API
crawlFeed, generateReport, MemoryStorage, and more
LLMS.txt Parser API
parseLLMSTxt, validateLLMSTxt, fetchLLMSTxt, toRAGFormat, and more
Common Types
These types are used across multiple packages:
LLMFeed
interface LLMFeed {
feed_type: 'llmfeed' // Required
metadata: Metadata // Required
capabilities?: Capability[]
items: Item[] // Required
trust?: TrustBlock
}Metadata
interface Metadata {
title: string // Required
origin: string // Required
description: string // Required
logo?: string
contact?: Contact
}Contact
interface Contact {
email?: string
name?: string
url?: string
}Capability
interface Capability {
name: string
description: string
endpoint?: string
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'
authentication?: Authentication
parameters?: JSONSchema
response?: JSONSchema
rateLimit?: RateLimit
}Item
interface Item {
title: string
description?: string
url: string
type?: string
tags?: string[]
published?: string
updated?: string
content?: string
}TrustBlock
interface TrustBlock {
type: 'signed'
algorithm: 'ed25519'
publicKey: string
signature: string
signedBlocks: string[] // e.g., ['feed_type', 'metadata', 'capabilities', 'items']
timestamp?: string
contentHash?: string
}ValidationResult
interface ValidationResult {
valid: boolean
structureValid: boolean
signatureValid?: boolean
signatureError?: string
errors: string[]
warnings?: string[]
}Error Handling
All packages use standard JavaScript errors:
try {
const result = await signFeed(feed, invalidKey)
} catch (error) {
if (error instanceof Error) {
console.error('Signing failed:', error.message)
}
}Common error types:
Error- General errorsTypeError- Invalid argument typesSyntaxError- Invalid JSON or schema
Async vs Sync
Most functions that involve cryptography are async:
// Async (returns Promise)
const keyPair = await generateKeyPair()
const signed = await signFeed(feed, privateKey)
const result = await validateLLMFeed(feed)
// Sync (returns immediately)
const result = validateFeedStructure(feed)
const sorted = deepSortObject(obj)ESM and CommonJS
All packages support both ESM and CommonJS:
// ESM
import { validateLLMFeed } from '@25xcodes/llmfeed-validator'
// CommonJS
const { validateLLMFeed } = require('@25xcodes/llmfeed-validator')