Skip to main content
Glama
J-MaFf

s2-netbox-mcp

by J-MaFf

get_access_history

Read-only

Retrieve historical access grant/deny records with optional filters, then optionally enrich results with badge-holder names and reader descriptions.

Instructions

Returns historical access (grant/deny) records for optional filters (wraps NBAPI GetAccessHistory). Identifies a person by ENCODEDNUM/HOTSTAMP, not PERSONID — GetAccessHistory has no PERSONID parameter. Set RESOLVENAMES: true to enrich each returned record with the badge-holder's FIRSTNAME/LASTNAME/FULLNAME/NOTES (default false — off); enabling it costs one extra GetPerson call per distinct person found in the result, which is why it is opt-in rather than on by default. RESOLVEDESCRIPTIONS defaults to true — the only default-on optional boolean in this codebase (an inverted, opt-out default, unlike RESOLVENAMES/dryRun-style flags elsewhere): each returned record is enriched with the reader's human-readable READERDESCRIPTION via one GetReaders full-table fetch per call (not per record, since the reader table is small and fixed-size); set RESOLVEDESCRIPTIONS: false to skip it.

Input Schema

NameRequiredDescriptionDefault
ORDERNoOptional. Sort order for returned records.
HOTSTAMPNoOptional. Restrict results to this hot-stamp number.
AFTERLOGIDNoOptional. Return records strictly after this LOGID.
CARDFORMATNoOptional. Card format of ENCODEDNUM/HOTSTAMP.
ENCODEDNUMNoOptional. Restrict results to this encoded card number.
MAXRECORDSNoOptional. Maximum number of records to return.
STARTLOGIDNoOptional. Begin returning records at this LOGID.
RESOLVENAMESNoOptional (default false). Enrich each returned record with the badge-holder's FIRSTNAME/LASTNAME/FULLNAME/NOTES via one extra GetPerson call per distinct person found in the result.
RESOLVEDESCRIPTIONSNoOptional (default true — on by default; the inverse of this codebase's usual optional-boolean default). Enrich each returned record with the reader's human-readable READERDESCRIPTION via one GetReaders full-table fetch per call (not per record). Set to false to skip it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.3.0
    • removedInput schema / properties / NEWESTDTTM
      Removed value: -{
      -  "description": "Optional. Newest date/time to include.",
      -  "type": "string"
      -}
    • removedInput schema / properties / OLDESTDTTM
      Removed value: -{
      -  "description": "Optional. Oldest date/time to include.",
      -  "type": "string"
      -}
    • addedInput schema / properties / RESOLVEDESCRIPTIONS
      Added value: +{
      +  "description": "Optional (default true — on by default; the inverse of this codebase's usual optional-boolean default). Enrich each returned record with the reader's human-readable READERDESCRIPTION via one GetReaders full-table fetch per call (not per record). Set to false to skip it.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / RESOLVENAMES
      Added value: +{
      +  "description": "Optional (default false). Enrich each returned record with the badge-holder's FIRSTNAME/LASTNAME/FULLNAME/NOTES via one extra GetPerson call per distinct person found in the result.",
      +  "type": "boolean"
      +}
  2. First observedv0.2.3

TDQS

A4/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, it discloses the exact cost model of each enrichment flag (one GetPerson per distinct person; one GetReaders full-table fetch per call, not per record), flags a codebase-wide anomaly (RESOLVEDESCRIPTIONS is the only default-on optional boolean, an inverted opt-out), and states the identity-key constraint. This is materially more than the annotations provide.

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

Conciseness3/5

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

The purpose is front-loaded well, but the third sentence is a single bloated construct with nested parentheticals, and it largely restates the RESOLVENAMES/RESOLVEDESCRIPTIONS schema descriptions rather than only adding the rationale. Useful content, but it does not read as tight.

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

Completeness5/5

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

For a 9-parameter read-only query tool with no output schema and full schema coverage, the description covers purpose, identity semantics, per-flag cost, and the unusual default behavior. An agent has everything needed to call it correctly and to decide whether to enable enrichment.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real semantic value the schema lacks: the warning that a person is identified by ENCODEDNUM/HOTSTAMP and not PERSONID (GetAccessHistory has no PERSONID parameter), plus the rationale behind the RESOLVE flag defaults. ORDER/AFTERLOGID/STARTLOGID/MAXRECORDS are left to the schema.

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

Purpose4/5

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

The opening clause gives a specific verb and resource ('Returns historical access (grant/deny) records') and even names the underlying NBAPI operation, so the agent knows exactly what data comes back. It does not explicitly differentiate itself from near-neighbors like get_event_history or get_reader_access_history, which keeps it short of a 5.

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

Usage Guidelines3/5

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

It gives clear guidance for the two optional enrichment flags (when to turn RESOLVENAMES on, and that RESOLVEDESCRIPTIONS is opt-out by default), which is genuinely useful. However there is no guidance on when to prefer this tool over sibling history tools, so usage context is only implied.

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