Semantic search over loaded scripts
semantic-search-scriptsFind the Roblox script most likely about a query by ranking an active client's loaded scripts on semantic similarity, returning ranked paths.
Instructions
Rank the active client's loaded/GC scripts by semantic relevance to a natural-language query. NOTE: full decompiled source is NOT available in the clean protocol, so each script is indexed over its GetFullName() path + Name + ClassName + the string constants reachable from its closure (capped per script) — think of it as 'find the script most likely about X', not a full-text code search. The first call embeds and caches every script (locally or via the configured embeddings endpoint); later calls reuse the cache for unchanged scripts. Returns { hits: [{ path, score, snippet }], model } sorted by descending cosine similarity. Signature: { query: string, limit: any?, maxScripts: any? }. Phase: orchestrate; cost=medium; idempotency=read-only. Requires: active-client. Produces: bounded-candidates. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of ranked hits to return. | |
| query | Yes | Natural-language description of the script you are looking for. | |
| maxScripts | No | Cap on how many scripts to harvest and index from the client. |