Skip to main content

Command-line client for exploring a Data Shape Server (DSS) knowledge-graph schemas.

Project description

dss-ai-tools

Tools for exploring a Data Shape Server (DSS) knowledge-graph schema — classes, properties, their relations, and namespaces — over the DSS HTTP API. Three ways to use it, all sharing one small client:

Component What it is Where
CLI A single-file Python client (dss), standard library only, Python ≥ 3.9. dss.py
Claude skill A self-contained Claude Code skill that drives the CLI. skill/
MCP server An MCP server exposing the same endpoints as tools. mcp-server/

The CLI is the source of truth; the skill and MCP server bundle a copy of dss.py so each is self-contained. Run scripts/sync.sh after editing the canonical dss.py to refresh the copies.

Configure

All three read the same environment variables:

export DSS_BASE_URL=https://dss.semtech.lv   # default
export DSS_TIMEOUT=30                        # optional, seconds

The CLI and MCP tools also accept a per-call override (--base-url / base_url).

CLI

python3 dss.py --help

Install on your PATH (optional):

pipx install .          # provides the `dss` command (see pyproject.toml)
# or, no packaging:
ln -s "$(pwd)/dss.py" ~/.local/bin/dss && chmod +x dss.py

Commands

Command DSS endpoint
ontologies [--variant ...] [--tag TAG] GET /api/info (variants 25, tags; --tag with variant 3)
schema-tags GET /api/schema_tags
public-ns GET /api/public_ns
namespaces <ont> GET /api/ontologies/<ont>/ns
classes <ont> [--limit N] [--filter STR] POST .../getClasses
properties <ont> [--limit N] [--filter REGEX] [--kind ...] POST .../getProperties
resolve-class <ont> <name> POST .../resolveClassByName
resolve-property <ont> <name> POST .../resolvePropertyByName
class-out-properties <ont> <class_id> [--limit N] POST .../xx_getClassOutProperties (by c_id)
class-in-properties <ont> <class_id> [--limit N] POST .../xx_getClassInProperties (by c_id)
class-pairs <ont> <p_list> POST .../xx_getCPCInfoNew — (source, target) class pairs for a property
call <ont> <fn> [--body JSON|-] [--param k=v ...] POST .../<fn> (escape hatch)

The class-* commands key on numeric ids: get a class id from resolve-class and a property id from resolve-property.

Output is indented JSON by default; pass --compact for single-line (pipe-friendly).

dss ontologies | jq '.[].db_schema_name'
dss classes dbpedia --filter Person --limit 20
dss resolve-property dbpedia dbo:birthPlace
dss class-pairs war_sampo 116

Claude skill

skill/ is a self-contained Claude Code skill. Install it user-level:

mkdir -p ~/.claude/skills
cp -R skill ~/.claude/skills/dss

See docs/USAGE.md for setup, pointing it at a server, and example prompts.

MCP server

See mcp-server/README.md. In short:

cd mcp-server
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
DSS_BASE_URL=https://dss.semtech.lv python3 dss_mcp.py

Exit codes (CLI)

  • 0 — success, JSON on stdout
  • 2 — HTTP / transport / argument error, message on stderr
  • 130 — interrupted (Ctrl-C)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dss_ai_tools-0.4.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dss_ai_tools-0.4.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file dss_ai_tools-0.4.0.tar.gz.

File metadata

  • Download URL: dss_ai_tools-0.4.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dss_ai_tools-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c4132a503ba405e9d89076c4286b9e88cb8fee04f806a61c6be0151ef42e4716
MD5 b722a57c2d93f81af5a0b3e6f9ff52cf
BLAKE2b-256 14aab4afa54538bee3f6148bd83ed4999ca8cfc64bf404cdf5a74b014a5dd171

See more details on using hashes here.

File details

Details for the file dss_ai_tools-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: dss_ai_tools-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for dss_ai_tools-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2932a1d3ede9e45ae02fb4e9c03c6849895ee234099d724317041103e944f77c
MD5 265169dde32bb70524a88675b0c5b166
BLAKE2b-256 95effa12acd01349916ad6eb85a755e85054774ba27a37653ee99efe47cf3892

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page