Skip to content

Commit f675d1d

Browse files
137 metadata timestamps (#776)
* Metadata / creation dates Signed-off-by: Mihai Criveti <[email protected]> * Metadata / creation dates Signed-off-by: Mihai Criveti <[email protected]> * Metadata / creation dates Signed-off-by: Mihai Criveti <[email protected]> * Security headers CSP Signed-off-by: Mihai Criveti <[email protected]> * Display metadata for resources Signed-off-by: Madhav Kandukuri <[email protected]> * eslint fix Signed-off-by: Madhav Kandukuri <[email protected]> --------- Signed-off-by: Mihai Criveti <[email protected]> Co-authored-by: Madhav Kandukuri <[email protected]>
1 parent fb13d0a commit f675d1d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

mcpgateway/admin.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1999,7 +1999,20 @@ async def admin_add_tool(
19991999
try:
20002000
tool = ToolCreate(**tool_data)
20012001
LOGGER.debug(f"Validated tool data: {tool.model_dump(by_alias=True)}")
2002-
await tool_service.register_tool(db, tool)
2002+
2003+
# Extract creation metadata
2004+
metadata = MetadataCapture.extract_creation_metadata(request, user)
2005+
2006+
await tool_service.register_tool(
2007+
db,
2008+
tool,
2009+
created_by=metadata["created_by"],
2010+
created_from_ip=metadata["created_from_ip"],
2011+
created_via=metadata["created_via"],
2012+
created_user_agent=metadata["created_user_agent"],
2013+
import_batch_id=metadata["import_batch_id"],
2014+
federation_source=metadata["federation_source"],
2015+
)
20032016
return JSONResponse(
20042017
content={"message": "Tool registered successfully!", "success": True},
20052018
status_code=200,

0 commit comments

Comments
 (0)