Skip to main content
Glama

azure_java_sdk_code_samples

Access code samples for Azure Java SDK packages to implement Azure services in Java applications. Provide the package name to retrieve working examples.

Instructions

Get code samples for Azure Java SDK, the package name usually starts with 'azure-'

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageYespackage name of the Azure SDK, for example: 'azure-ai-inference'

Implementation Reference

  • index.js:64-98 (handler)
    Handler logic that fetches the latest version of the Azure Java SDK package from Maven repository, retrieves its README.md, and returns the content as text.
    case "azure_java_sdk_code_samples": const { package: packageName } = args; if (!packageName) { throw new McpError( ErrorCode.InvalidRequest, "Package name is required" ); } const groupId = "com.azure"; const groupPath = groupId.replace(/\./g, "/"); const artifactId = packageName; // Get latest version const artifactUrl = "https://repo1.maven.org/maven2/" + groupPath + "/" + artifactId; let response = await fetch(artifactUrl + "/maven-metadata.xml"); const listData = await response.text(); // Extract version from <latest>version</latest> tag const versionRegex = /<latest>(.*?)<\/latest>/; const versionMatch = listData.match(versionRegex); const latestVersion = versionMatch[1]; // Get the readme.md of the SDK const readmeUrl = artifactUrl + "/" + latestVersion + "/" + artifactId + "-" + latestVersion + "-readme.md"; response = await fetch(readmeUrl); const readmeData = await response.text(); return { content: [ { type: "text", text: readmeData, }, ], };
  • Input schema defining the required 'package' parameter as a string.
    inputSchema: { type: "object", properties: { package: { type: "string", description: "package name of the Azure SDK, for example: 'azure-ai-inference'", }, }, required: ["package"], },
  • index.js:40-53 (registration)
    Registration of the tool in the ListToolsRequestSchema handler, including name, description, and input schema.
    { name: "azure_java_sdk_code_samples", description: "Get code samples for Azure Java SDK, the package name usually starts with 'azure-'", inputSchema: { type: "object", properties: { package: { type: "string", description: "package name of the Azure SDK, for example: 'azure-ai-inference'", }, }, required: ["package"], }, },
Install Server

Other Tools

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/weidongxu-microsoft/mcp-azure-java-sdk-assist'

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