Skip to content

Add get_vistas tool for retrieving DevRev vista information #30

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 2 commits into
base: main
Choose a base branch
from

Conversation

anoushkakumar321
Copy link

@anoushkakumar321 anoushkakumar321 commented Jul 11, 2025

Summary
Adds a new "get_vistas" tool to the DevRev MCP server that allows users to retrieve vista (filtered view) information by ID.

Changes Made

  • New Tool: Added "get_vistas" tool with proper input schema validation
  • Handler Implementation: Complete tool handler with comprehensive error handling
  • API Integration: Uses existing make_devrev_request utility for consistency
  • Search Enhancement: Added "vista" namespace to search tool for better vista discovery

Anoushka Kumar added 2 commits July 11, 2025 11:06
- Add get_vistas tool definition with input schema validation
- Implement complete handler with error handling and API integration
- Add vista namespace to search tool for comprehensive vista support
- Clean up leftover commented code
- Use existing make_devrev_request utility for consistent API calls

This enables users to retrieve vista (filtered view) information by ID,
expanding the MCP server's DevRev integration capabilities.
@anoushkakumar321 anoushkakumar321 requested a review from a team as a code owner July 11, 2025 06:10
@@ -8,6 +8,8 @@
import asyncio
import os
import requests
import json
Copy link
Contributor

Choose a reason for hiding this comment

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

These imports are not used, remove them

@@ -30,6 +32,20 @@ async def handle_list_tools() -> list[types.Tool]:
description="Fetch the current DevRev user details. When the user specifies 'me' in the query, this tool should be called to get the user details.",
inputSchema={"type": "object", "properties": {}},
),
types.Tool(
name="get_vistas",
description="Retrieve all available vistas (filtered views) from DevRev",
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix this description, the tool fetches information about a vista in DevRev using its ID.

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this file from this PR. This is an autogenerated file.

@@ -30,6 +32,20 @@ async def handle_list_tools() -> list[types.Tool]:
description="Fetch the current DevRev user details. When the user specifies 'me' in the query, this tool should be called to get the user details.",
inputSchema={"type": "object", "properties": {}},
),
types.Tool(
name="get_vistas",
Copy link
Contributor

Choose a reason for hiding this comment

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

name of the tool should be "get_vista"

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