Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions tools/CreateMappings_rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -979,5 +979,45 @@
{
"module": "DependencyMap",
"alias": "DependencyMap"
},
{
"alias": "YashMaps",
"module": "YashMaps"
},
{
"alias": "YashMaps2",
"module": "YashMaps2"
},
{
"alias": "TestArizeAI",
"module": "TestArizeAI"
},
{
"alias": "TestData",
"module": "TestData"
},
{
"alias": "YashMaps3",
"module": "YashMaps3"
},
{
"alias": "YashMaps4",
"module": "YashMaps4"
},
{
"alias": "YashMaps5",
"module": "YashMaps5"
},
{
"alias": "YashMaps6",
"module": "YashMaps6"
},
{
"alias": "TestPinecone",
"module": "TestPinecone"
},
{
"module": "YashMaps7",
"alias": "YashMaps7"
}
]
24 changes: 23 additions & 1 deletion tools/Mcp/src/CodegenServer.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
import { responseSchema, toolParameterSchema, toolSchema, promptSchema } from "./types.js";
import { responseSchema, toolParameterSchema, toolSchema, promptSchema, resourceSchema } from "./types.js";
import { ToolsService } from "./services/toolsService.js";
import { PromptsService } from "./services/promptsService.js";
import { ResourcesService } from "./services/resourcesService.js";
import { readFileSync } from "fs";
import path from "path";
import { fileURLToPath } from "url";
Expand Down Expand Up @@ -37,6 +38,7 @@ export class CodegenServer {
this.initResponses();
this.initTools();
this.initPrompts();
this.initResources();
}

// dummy method for sending sampling request
Expand Down Expand Up @@ -74,6 +76,9 @@ export class CodegenServer {
await this._mcp.connect(transport);
}

public getResponseTemplate(name: string): string | undefined {
return this._responses.get(name);
}

initTools() {
const toolsService = ToolsService.getInstance().setServer(this);
Expand Down Expand Up @@ -105,6 +110,21 @@ export class CodegenServer {
}
}

initResources() {
const resourcesService = ResourcesService.getInstance().setServer(this);
const resourcesSchemas = (specs.resources || []) as resourceSchema[];
for (const schema of resourcesSchemas) {
const parameter = resourcesService.createResourceParametersFromSchema(schema.parameters || []);
const callback = resourcesService.getResources(schema.callbackName, this._responses.get(schema.name));
this._mcp.resource(
schema.name,
schema.description,
parameter,
(args: any) => callback(args)
);
}
}

initResponses() {
(responses as responseSchema[])?.forEach((response: responseSchema) => {
let text = response.text;
Expand All @@ -120,4 +140,6 @@ export class CodegenServer {
this._responses.set(response.name, text);
});
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
---
external help file: Az.Databricks-help.xml
Module Name: Az.Databricks
online version: https://learn.microsoft.com/powershell/module/az.databricks/get-azdatabricksaccessconnector
schema: 2.0.0
---

# Get-AzDatabricksAccessConnector

## SYNOPSIS
Gets an Azure Databricks Access Connector.

## SYNTAX

### List1 (Default)
```
Get-AzDatabricksAccessConnector [-SubscriptionId <String[]>] [-DefaultProfile <PSObject>]
[<CommonParameters>]
```

### Get
```
Get-AzDatabricksAccessConnector -Name <String> -ResourceGroupName <String> [-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>] [<CommonParameters>]
```

### List
```
Get-AzDatabricksAccessConnector -ResourceGroupName <String> [-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>] [<CommonParameters>]
```

### GetViaIdentity
```
Get-AzDatabricksAccessConnector -InputObject <IDatabricksIdentity> [-DefaultProfile <PSObject>]
[<CommonParameters>]
```

## DESCRIPTION
Gets an Azure Databricks Access Connector.

## EXAMPLES

### Example 1: List all access connectors under a subscription.
```powershell
Get-AzDatabricksAccessConnector
```

```output
Location Name ResourceGroupName
-------- ---- -----------------
eastus azps-databricks-accessconnector azps_test_gp_db
```

This command lists all access connectors under a subscription.

### Example 2: List all access connectors under a resource group.
```powershell
Get-AzDatabricksAccessConnector -ResourceGroupName azps_test_gp_db
```

```output
Location Name ResourceGroupName
-------- ---- -----------------
eastus azps-databricks-accessconnector azps_test_gp_db
```

This command lists all access connectors under a resource group.

### Example 3: Get a access connectors by name.
```powershell
Get-AzDatabricksAccessConnector -ResourceGroupName azps_test_gp_db -Name azps-databricks-accessconnector
```

```output
Location Name ResourceGroupName
-------- ---- -----------------
eastus azps-databricks-accessconnector azps_test_gp_db
```

This command gets a access connectors by name.

## PARAMETERS

### -DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

```yaml
Type: System.Management.Automation.PSObject
Parameter Sets: (All)
Aliases: AzureRMContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -InputObject
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IDatabricksIdentity
Parameter Sets: GetViaIdentity
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -Name
The name of the Azure Databricks Access Connector.

```yaml
Type: System.String
Parameter Sets: Get
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ResourceGroupName
The name of the resource group.
The name is case insensitive.

```yaml
Type: System.String
Parameter Sets: Get, List
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -SubscriptionId
The ID of the target subscription.
The value must be an UUID.

```yaml
Type: System.String[]
Parameter Sets: List1, Get, List
Aliases:

Required: False
Position: Named
Default value: (Get-AzContext).Subscription.Id
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.IDatabricksIdentity

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.Databricks.Models.Api20240501.IAccessConnector

## NOTES

## RELATED LINKS
Loading
Loading