Hub/Docs

Tools

How agents interact with the wiki-base: MCP tools for external agents, Slop tools for the Discord bot.

Tools

Two independent tool systems exist. Both query the same Turso database but serve different runtimes.

SystemWhereUsed byAccess
MCP toolsapps/mcp-server-standalone/External agents (Claude Code, Cursor, etc.)Read-only
Slop toolsapps/bots/slop/src/tools.tsDiscord botRead-only (writes via slash commands only)

MCP Tools

The MCP server is an NPX package (latent-space-hub-mcp) that external agents install to query the wiki-base. It connects directly to Turso and exposes read-only tools.

Install and configure:

npx latent-space-hub-mcp

Requires Turso credentials via environment variables (TURSO_DATABASE_URL, TURSO_AUTH_TOKEN) or ~/.latent-space-hub/config.json. See the MCP Server page for setup details.

Available Tools (9, read-only)

MCP NameWhat it does
ls_get_contextWiki-base stats (node counts, edge counts, chunk counts)
ls_search_nodesKeyword search on node titles, descriptions, and notes
ls_get_nodesLoad full node records by ID
ls_search_contentHybrid search (vector + FTS5 + RRF) over transcript and article text
ls_query_edgesGet connections for a node
ls_list_dimensionsList dimensions with node counts
ls_sqlite_queryRead-only SQL (SELECT/WITH/PRAGMA only)
ls_list_skillsList system and custom skills
ls_read_skillRead a skill's markdown content by name

ls_search_content is the most powerful search tool. If an OPENAI_API_KEY is configured, it runs vector similarity + FTS5 keyword matching with Reciprocal Rank Fusion. Without it, it falls back to FTS5 and keyword matching only.

Skills (ls_list_skills, ls_read_skill) are markdown documents agents can read for orientation and query patterns. See the Skills page.

Write Tools

The MCP server does not expose write tools. External agents cannot create, update, or delete nodes, edges, or dimensions. The wiki-base is maintained by the ingestion pipeline and internal tooling.


Slop Tools (Discord Bot)

Slop has its own tool definitions in apps/bots/slop/src/tools.ts. These are completely independent from the MCP tools: defined as OpenAI function-calling format, executed via direct Turso queries.

All 9 Tools (Read-Only)

// apps/bots/slop/src/tools.ts

// search tools
{ name: "slop_semantic_search",  description: "Vector search by meaning (default for questions)" },
{ name: "slop_search_nodes",     description: "Keyword substring match on node titles/descriptions" },
{ name: "slop_search_content",   description: "FTS5 keyword search through transcript/article text" },

// graph traversal
{ name: "slop_get_nodes",        description: "Load full node records by ID" },
{ name: "slop_query_edges",      description: "Get connections for a node" },
{ name: "slop_list_dimensions",  description: "List dimensions with counts" },

// utility
{ name: "slop_get_context",      description: "Wiki-base stats (nodes, edges, chunks)" },
{ name: "slop_sqlite_query",     description: "Read-only SQL (SELECT/WITH/PRAGMA)" },
{ name: "slop_read_skill",       description: "Read a skill's markdown content" },

slop_semantic_search embeds the query via OpenAI text-embedding-3-small and runs vector_top_k() on both node and chunk embeddings, fusing results with RRF. The keyword tools (search_nodes, search_content) use SQL LIKE and FTS5 respectively. Every handler runs parameterized SQL against Turso. Results are truncated to 4000 chars to prevent token bloat.

Write Operations (Not Tools)

Slop's write operations happen outside the LLM tool loop, triggered only by Discord slash commands:

CommandWhat it writes
/joinCreates a member node
/paper-clubCreates a scheduled event node
/builders-clubCreates a scheduled event node
/edit-eventUpdates or cancels the caller's scheduled event
/issueCreates a Hub backlog item, PRD, and linked GitHub issue

Member profile updates also happen post-response (updating notes, metadata, and edges) but are not LLM-callable tools.


Comparison

MCP ToolsSlop Tools
FormatMCP SDK + Zod schemasOpenAI function-calling JSON
DB accessDirect Turso (standalone package)Direct Turso (apps/bots/slop)
SearchHybrid (vector + FTS5 + RRF) via ls_search_content3 separate tools: semantic, keyword, FTS5
Read tools99
Write tools00 (writes via slash commands only)
Prefixls_slop_
Used byAny MCP-compatible agentDiscord bot only