Skip to main content
Glama

Create HTTP/WebSocket data source

create_data_source_http_ws

Ingest live data using HTTP polling with custom methods and headers, or WebSocket streams with auto-reconnect. Map JSON fields to CHOP channels via JSONPath selectors.

Instructions

Advanced live-data ingest for HTTP polling and WebSocket streams — the richer-transport sibling of create_data_source. http_poll: webclientDAT driven by a timerCHOP so polling cadence is a real CHOP signal you can retune/sync; supports custom HTTP method, headers, and body. websocket: websocketDAT with auto-reconnect, persistent connection. Both: JSONPath-lite selectors ($.key, $.key.sub, $.arr[0].field — no wildcards/filters) map response fields to named channels on an output Null CHOP ready for bind_to_channel. Raw body exposed on a Null DAT. Use create_data_source for simple one-knob JSON/CSV polling; use this tool when you need real POST/headers, fine-cadence timer sync, or a WebSocket stream.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoTransport.http_poll
parent_pathNoCOMP to build inside./project1
nameNoBase name for the created baseCOMP; defaults to data_src_<mode>.
urlYesEndpoint URL. http(s):// for http_poll; ws:// or wss:// for websocket. Note: webclientDAT runs inside TD (no browser CORS). wss:// with self-signed certs may silently fail (statusCode 0). JSONPath selector support: $.name, $.key.sub, $.arr[0].field — no wildcards or filters.
methodNoHTTP method. http_poll only; ignored for websocket.get
headersNoRequest headers (http_poll) or connect headers (websocket; best-effort, param may vary by TD build).
bodyNoRequest body. http_poll only; caller pre-serializes JSON.
selectorsYesJSONPath-lite selectors. Each name becomes a Null CHOP channel and must be unique. path must start with $. Supported: $.key, $.key.sub, $.arr[0], $.arr[0].key. Non-numeric or missing values fall back to 0 with a warning.
poll_secondsNoPolling interval in seconds. http_poll only; drives the timerCHOP cycle.
reconnect_secondsNoSeconds between reconnect attempts. websocket only.
expose_controlsNoSurface live Active, Poll/Reconnect, and per-selector LastValue readouts.
static_sampleNoSeed values keyed by selector name. Missing names default to 0.5.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate it's not read-only, not destructive, and open-world. The description adds substantial behavioral context: uses webclientDAT, timerCHOP, websocketDAT, auto-reconnect, JSONPath-lite selectors, and mentions limitations like self-signed certs. This goes beyond annotations, though annotations already cover basic safety traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single paragraph that efficiently conveys purpose, usage guidelines, and key details. It is front-loaded with the main purpose and distinguishes from sibling. Every sentence adds value, though slightly more structure (e.g., bullet points) could improve readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (12 parameters, 2 required, no output schema), the description covers the main functionality, distinguishes from sibling, mentions limitations (e.g., self-signed certs), and indicates output format (Null CHOP, Null DAT). It is sufficiently complete for an agent to understand and use the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All 12 parameters have schema descriptions, so baseline is 3. The description provides a high-level overview but does not add significant detail beyond the schema. It summarizes key parameters (e.g., mode, url, selectors) but the schema already covers individual parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Advanced live-data ingest for HTTP polling and WebSocket streams'. It distinguishes itself from the sibling tool 'create_data_source' by calling itself the 'richer-transport sibling' and explicitly listing the use cases where it is preferable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool versus the sibling: 'Use create_data_source for simple one-knob JSON/CSV polling; use this tool when you need real POST/headers, fine-cadence timer sync, or a WebSocket stream.' This clearly delineates usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Pantani/tdmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server