Skip to content

Add utility APIs and add brief return fields and pagination #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

arthanson
Copy link
Contributor

@arthanson arthanson commented May 7, 2025

  • Adds new tools for AI Agent:
    • netbox_get_valid_filters
    • netbox_get_fields
    • netbox_slugify_name

These utility functions can be used by the API to get what parameters to pass to other APIs as the documentation can be out of sync with the version of netbox being used. Also reduces the context data that needs to be sent to the UI (i.e. not sending one big table of all apis, filters, etc..

  • Returns brief API by default to limit amount of data for AI agent

  • Adds pagination

  • Adds a contents.py that contains a dictionary used for these APIs that specify what filters, fields, etc. are available. Note: This is somewhat version specific to NetBox

  • Also add CODEOWNERS file for auto review assignment.

@arthanson arthanson changed the title DRAFT: Add constants and new APIs Add utility APIs and add brief return fields and pagination May 19, 2025
@arthanson arthanson requested a review from beevek May 19, 2025 21:57
@arthanson arthanson marked this pull request as ready for review May 19, 2025 21:57
Copy link
Contributor

@beevek beevek left a comment

Choose a reason for hiding this comment

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

Thanks @arthanson - couple questions:

  • I think now we are not passing a list of object types to the LLM in any of the MCP tools' docs (just giving the very brief example in netbox_get_objects of "devices", "ip-addresses"). Main worry I have with this is the LLM may not have a complete understanding of the available object types for all the tools. Should we add a get_object_types tool? Or re-inject a list of object types in the docs of one of the tools?
  • Do we need netbox_slugify_name to be an MCP tool? Is it mainly used to sanitize params for other tools (in which case, can we just call it inside the appropriate tool calls)? Just trying to have a predilection for minimizing the number of tools (to maximize effectiveness in using them).

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.

2 participants