Skip to content

Conversation

@ltucker
Copy link
Contributor

@ltucker ltucker commented Oct 28, 2025

  • Uses dotted app.model format for NetBox object types in tool calls
  • Added netbox_types.py with slightly expanded structure to track relevant information about types
  • Builds parts of tool descriptions using model info rather than replicating type information in comments (avoids needing to maintain comments)

This pull request refactors how NetBox object types and API endpoints are managed and referenced throughout the codebase. The main improvement is the transition from using legacy short names (like "devices", "sites") to fully qualified object type strings (like "dcim.device", "ipam.ipaddress"), along with a centralized mapping for endpoints. This change affects both the main server code and associated tests. The update also improves the documentation and descriptions for tools, ensuring consistency.

@ltucker ltucker requested a review from Copilot October 28, 2025 13:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the codebase to use a standardized app.model naming convention (e.g., dcim.device, ipam.ipaddress) instead of legacy short names (e.g., devices, ip-addresses) for NetBox object types. The changes centralize type information in a new netbox_types.py module with structured metadata and dynamically generate tool descriptions from this data.

Key changes:

  • Introduced netbox_types.py with structured object type definitions containing name and endpoint mappings
  • Updated all tool functions and tests to use the new dotted naming convention
  • Dynamically built tool descriptions from type metadata rather than maintaining static documentation

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
netbox_types.py New file defining all NetBox object types with structured metadata (name, endpoint)
server.py Updated to use new type convention, import from netbox_types, and generate descriptions dynamically
tests/test_search.py Updated test cases to use new app.model format for object types
tests/test_ordering.py Updated test cases to use new app.model format for object types
tests/test_brief.py Updated test cases to use new app.model format for object types

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ltucker ltucker merged commit 925c0d2 into main Oct 28, 2025
2 checks passed
@ltucker ltucker deleted the update_object_types branch October 28, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants