Skip to main content
Glama

search_wiki_pages

Search for wiki pages by title or content within Azure DevOps projects to find relevant documentation and information.

Instructions

Search for wiki pages by title or content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe name or ID of the project.
search_termYesThe term to search for in page titles and content.
wiki_identifierYesThe name or ID of the wiki.

Implementation Reference

  • The core handler function implementing the search_wiki_pages tool. It lists all wiki pages, fetches content for each, and returns matching pages based on the search term in path or content.
    def search_wiki_pages(self, project, wiki_identifier, search_term): """ Search for wiki pages by title or content. """ pages = self.list_wiki_pages(project, wiki_identifier) matching_pages = [] for page_info in pages: try: # Get page content to search in page = self.wiki_client.get_page( project=project, wiki_identifier=wiki_identifier, path=page_info["path"], include_content=True ) # Search in path (title) and content if (search_term.lower() in page_info["path"].lower() or (page.page.content and search_term.lower() in page.page.content.lower())): matching_pages.append({ "path": page_info["path"], "url": page_info["url"], "content_preview": page.page.content[:200] + "..." if page.page.content and len(page.page.content) > 200 else page.page.content }) except Exception: # Skip pages that can't be accessed continue return matching_pages
  • Input schema definition for the search_wiki_pages tool, specifying parameters: project, wiki_identifier, search_term.
    inputSchema={ "type": "object", "properties": { "project": { "type": "string", "description": "The name or ID of the project." }, "wiki_identifier": { "type": "string", "description": "The name or ID of the wiki." }, "search_term": { "type": "string", "description": "The term to search for in page titles and content." }, }, "required": ["project", "wiki_identifier", "search_term"], "additionalProperties": False }
  • Registration of the search_wiki_pages tool in the MCP server using types.Tool, including description and input schema.
    types.Tool( name="search_wiki_pages", description="Search for wiki pages by title or content.", inputSchema={ "type": "object", "properties": { "project": { "type": "string", "description": "The name or ID of the project." }, "wiki_identifier": { "type": "string", "description": "The name or ID of the wiki." }, "search_term": { "type": "string", "description": "The term to search for in page titles and content." }, }, "required": ["project", "wiki_identifier", "search_term"], "additionalProperties": False } ),
  • Dispatch handler in the MCP server's _execute_tool method that calls the client implementation for search_wiki_pages.
    elif name == "search_wiki_pages": return self.client.search_wiki_pages(**arguments)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xrmghost/mcp-azure-devops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server