Skip to content
Open
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
8 changes: 5 additions & 3 deletions src/mcp_foundry/mcp_foundry_model/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async def get_model_details_and_code_samples(model_name: str, ctx: Context):
This function is used when a user requests detailed information about a particular model in the Foundry catalog.
It fetches the model's metadata, capabilities, descriptions, and other relevant details associated with the given asset ID.

It is important that you provide the user a link to more information for compliance reasons. Use the link provided.
It is important that you provide the user a link to more information for compliance reasons. Use the link provided and call it a link to the model card.

Parameters:
model_name (str): The name of the model whose details are to be retrieved. This is a required parameter.
Expand Down Expand Up @@ -158,10 +158,12 @@ async def get_model_details_and_code_samples(model_name: str, ctx: Context):
project_names = [project["name"] for project in project_response["projects"]]

if model_name in project_names:
project_details = await get_code_sample_for_labs_model(model_name, ctx)
model_details["details"] = project_response["projects"][project_names.index(model_name)]
model_details["code_sample_github"] = await get_code_sample_for_labs_model(model_name, ctx)
model_details["code_sample_github"] = project_details
model_details["type"] = "Labs"
model_details["link"] = "https://ai.azure.com/labs"
model_details["link"] = project_details["model_card_url"]

return ModelDetails(**model_details)

model_list_details = get_models_list(ctx, model_name=model_name)
Expand Down