Skip to content

netbox-sdk v0.0.11

Latest

Choose a tag to compare

@emersonfelipesp emersonfelipesp released this 19 Aug 21:21

netbox-sdk 0.0.11 is a large release. It adds NetBox 4.7 support, a Model Context Protocol server so AI agents can operate NetBox through a typed, gated tool surface, and a set of correctness fixes in the typed client and runtime discovery.

NetBox 4.7 support

  • Bundled OpenAPI schema, Pydantic models, and typed bindings for the 4.7 release line, alongside 4.3 through 4.6.
  • Release-line resolution is now a single shared registry consumed by the SDK, CLI, TUI, and MCP server, so every surface agrees on which contract it is speaking.
  • Typed callers can request 4.7 background bulk operations with background=True, receiving the job reference the server returns instead of a validation error.

Model Context Protocol server

  • New optional netbox_mcp package and nbx-mcp entry point (pip install 'netbox-sdk[mcp]'), exposing a narrow typed tool surface over the same schema index, request resolver, and client the SDK and CLI use.
  • Mutations are denied by default and require an explicit opt-in; dry runs preview a request without constructing a client or sending anything.
  • A versioned plugin bridge lets a NetBox plugin advertise semantic tools backed by its own REST endpoints, with strict manifest, schema, argument, and size validation, and no second credential store.
  • nbx capabilities emits the whole reachable surface as one structured document.

Correctness fixes

  • Bulk mutations no longer report success as failure. Posting a list committed the batch but validated the list response against the single-object model, raising after the server had already applied every object and inviting a duplicate retry.
  • An unpinned MCP server now answers for the instance it is connected to, resolving the connected release line once on first use and failing closed rather than answering from the default bundled contract.
  • Capability discovery probes a real record. It previously sent OPTIONS to a literal {id} placeholder, which routers reject, so supported PATCH, PUT, and DELETE methods were silently reported as unavailable.
  • The shared schema document is read-only, so one consumer can no longer corrupt it for every other consumer in the process.
  • Runtime discovery pagination preserves repeated query parameters and terminates on a repeated or excessive page.

Packaging and telemetry

  • Django model-build catalogs now ship inside the distribution and are read through package resources, so an installed wheel exposes them; generated builds are written to a user-writable location instead of alongside the installed package.
  • Optional OpenTelemetry request metrics: set an OTLP endpoint and the client emits request counts and durations with bounded-cardinality attributes. Failed requests are counted, and telemetry never raises into the caller.

Compatibility

No breaking API changes. Supports Python 3.11+ and NetBox 4.3 through 4.7.

pip install 'netbox-sdk[all]==0.0.11'