> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # DataSphereServerlessSkill > Search a SignalWire DataSphere document via a serverless DataMap tool — no agent webhook round-trip. [add-skill]: /docs/server-sdks/reference/typescript/agents/agent-base/add-skill [ref-datamap]: /docs/server-sdks/reference/typescript/agents/data-map Same DataSphere search as [`DataSphereSkill`](/docs/server-sdks/reference/typescript/agents/skills/datasphere), but the tool is registered as a [DataMap][ref-datamap] — the SignalWire platform executes the search directly, without calling back to your agent process. Credentials and URL are **baked into the DataMap** from config at registration time, so the same parameters are required here as on DataSphereSkill. **Class:** `DataSphereServerlessSkill` **Tools:** Custom per instance via `tool_name` (default `search_knowledge`), registered as a DataMap-style SWAIG function. **Env vars:** None. `space_name`, `project_id`, and `token` must be supplied as config values — the serverless build path reads config only, not environment variables. **Multi-instance:** yes **`tool_name`** `string` — default: search\_knowledge Custom tool name for this instance. Required when registering multiple instances on the same agent. --- **`space_name`** `string` — required SignalWire space name (e.g., `"mycompany"` from `mycompany.signalwire.com`). --- **`project_id`** `string` — required SignalWire project ID. --- **`token`** `string` — required SignalWire API token. --- **`document_id`** `string` — required DataSphere document ID to search within. --- **`count`** `integer` — default: 1 Number of results to return (range `1-10`). --- **`distance`** `number` — default: 3.0 Maximum distance threshold (range `0-10`; lower is more relevant). --- **`tags`** `string[]` Tags to filter results. --- **`language`** `string` Language code for query expansion (e.g., `"en"`, `"es"`). --- **`pos_to_expand`** `string[]` Parts of speech to expand with synonyms. Entries must be one of `"NOUN"`, `"VERB"`, `"ADJ"`, `"ADV"`. --- **`max_synonyms`** `integer` Maximum number of synonyms used for query expansion (range `1-10`). --- **`no_results_message`** `string` Message returned when no results match the query. Supports a `{query}` placeholder that is substituted with the user's query text at registration time. --- ## Example ```typescript {6-11} import { AgentBase, DataSphereServerlessSkill } from '@signalwire/sdk'; const agent = new AgentBase({ name: 'assistant', route: '/assistant' }); agent.setPromptText('You are a helpful assistant.'); await agent.addSkill(new DataSphereServerlessSkill({ space_name: 'mycompany', document_id: 'doc_1234', count: 3, tool_name: 'search_product_docs', })); agent.run(); ``` > Search a SignalWire DataSphere document via a serverless DataMap tool — no agent webhook round-trip.