Skip to content

Comments

Adding tool to fetch the public IP for databases, plus some small fixes in descriptions#107

Open
shyam2511 wants to merge 1 commit intooracle:mainfrom
shyam2511:database-mcp-changes
Open

Adding tool to fetch the public IP for databases, plus some small fixes in descriptions#107
shyam2511 wants to merge 1 commit intooracle:mainfrom
shyam2511:database-mcp-changes

Conversation

@shyam2511
Copy link
Member

@shyam2511 shyam2511 commented Jan 7, 2026

Description

Adding tool to fetch the public IP for databases, plus some small fixes in descriptions.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 7, 2026
@shyam2511 shyam2511 force-pushed the database-mcp-changes branch 2 times, most recently from 030c3ed to 6b3fcd0 Compare January 7, 2026 08:55
None,
description="**[Required]** Gets the compartment_id of this PluggableDatabase. The `OCID`__ of the compartment. __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm",
)
connection_strings: Optional[str] = Field(None, description="")
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a description here? Also I think this should have a type associated with it instead of Any

)
connection_strings: Optional[str] = Field(None, description="")
connection_strings: Optional[Any] = Field(None, description="")
container_database_id: Optional[str] = Field(
Copy link
Member

Choose a reason for hiding this comment

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

container_database_id field is marked as optional but the description it says its required. I think we need to adjust one of these

freeform_tags: Optional[str] = Field(
freeform_tags: Optional[dict] = Field(
None,
description='Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__. Example: `{"Department": "Finance"}` __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm',
Copy link
Member

Choose a reason for hiding this comment

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

Any examples should be in the examples argument. See https://docs.pydantic.dev/2.0/api/fields/#pydantic.fields.Field

Copy link
Member Author

Choose a reason for hiding this comment

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

This model is a pojo that is never visible to the agent, hence the description shouldn't matter here

return map_pluggabledatabase(response.data)


def get_public_ip_for_db(database_id, region=None):
Copy link
Member

Choose a reason for hiding this comment

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

Can we add unit tests for these changes

Copy link
Member Author

Choose a reason for hiding this comment

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

Added the tests.


try:
# Fetch VNIC details
get_vnic_response = virtual_network_client.get_vnic(node.vnic_id)
Copy link
Member

Choose a reason for hiding this comment

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

We already have a tool in the networking mcp server called get_vnic. Is it worth it to just use that instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

We require this tool to be in our server itself, that's why we have added it. Otherwise the user will have to install both servers, and the agent would have no way to know how to actually get the public IPs even when given these tools

@shyam2511 shyam2511 force-pushed the database-mcp-changes branch from 6b3fcd0 to 2a33f60 Compare January 9, 2026 09:41
@shyam2511 shyam2511 force-pushed the database-mcp-changes branch from 2a33f60 to 1a7c01c Compare February 17, 2026 10:14
@shyam2511 shyam2511 changed the title Adding feature to replace the host ip with public ip in get/list pluggable databases Adding tool to fetch the public IP for databases, plus some small fixes in descriptions Feb 17, 2026
@shyam2511 shyam2511 requested a review from cboffa13 February 18, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants