Skip to main content
Glama

get_file_content

Retrieve file content from Azure DevOps repositories to access code, documentation, or configuration files for development workflows.

Instructions

Gets the content of a file in a repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesThe name or ID of the project.
repository_idYesThe name or ID of the repository.
pathYesThe path to the file.

Implementation Reference

  • The core handler function that implements the logic to retrieve file content from an Azure DevOps repository using the Git client API.
    def get_file_content(self, project, repository_id, path): return self.git_client.get_item_text( project=project, repository_id=repository_id, path=path )
  • Tool registration in the MCP server, defining the tool name, description, and input schema for validation.
    types.Tool( name="get_file_content", description="Gets the content of a file in a repository.", inputSchema={ "type": "object", "properties": { "project": { "type": "string", "description": "The name or ID of the project." }, "repository_id": { "type": "string", "description": "The name or ID of the repository." }, "path": { "type": "string", "description": "The path to the file." }, }, "required": ["project", "repository_id", "path"], "additionalProperties": False } ),
  • Dispatch handler in the server's _execute_tool method that invokes the AzureDevOpsClient's get_file_content method with parsed arguments.
    elif name == "get_file_content": return self.client.get_file_content(**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