{"id":4918,"date":"2025-06-05T02:44:38","date_gmt":"2025-06-05T09:44:38","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/semantic-kernel\/?p=4918"},"modified":"2025-06-05T02:45:43","modified_gmt":"2025-06-05T09:45:43","slug":"enhancing-plugin-metadata-management-with-semanticpluginforge","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/agent-framework\/enhancing-plugin-metadata-management-with-semanticpluginforge\/","title":{"rendered":"Enhancing Plugin Metadata Management with SemanticPluginForge"},"content":{"rendered":"<p class=\"code-line\" dir=\"auto\" data-line=\"2\">In the world of software development, flexibility and adaptability are key. Developers often face challenges when it comes to updating plugin metadata dynamically without disrupting services or requiring redeployment. This is where\u00a0<strong>SemanticPluginForge<\/strong>, an open-source project, steps in to improve the way we manage plugin metadata.<\/p>\n<h2 id=\"llm-function-calling-feature\" class=\"code-line\" dir=\"auto\" data-line=\"4\">LLM Function Calling Feature<\/h2>\n<p class=\"code-line\" dir=\"auto\" data-line=\"6\">The function calling feature in LLMs allows developers to define a set of functions that the model can invoke during a conversation. These functions are described using metadata, which includes the function name, parameters, and their descriptions. The LLM uses this metadata to determine when and how to call a function, ensuring seamless integration between the model and external systems.<\/p>\n<h3 id=\"semantic-kernel-plugins-and-function-calling\" class=\"code-line\" dir=\"auto\" data-line=\"8\">Semantic Kernel Plugins and Function Calling<\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"10\">Semantic Kernel plugins enhance the LLM function-calling experience by providing a structured way to define and manage these functions. Each plugin encapsulates a set of related functionalities, exposing them through well-defined metadata. This metadata includes descriptions, parameter details, and return value information, making it easier for developers and AI systems to understand and utilize the functions effectively.<\/p>\n<p class=\"code-line\" dir=\"auto\" data-line=\"12\">SemanticPluginForge builds on this foundation by offering tools to dynamically manage and update plugin metadata, ensuring that function calling remains flexible, adaptable, and user-friendly.<\/p>\n<h2 id=\"the-pain-points\" class=\"code-line\" dir=\"auto\" data-line=\"14\">The Pain Points<\/h2>\n<h3 id=\"1-static-metadata-management\" class=\"code-line\" dir=\"auto\" data-line=\"16\">1.\u00a0<strong>Static Metadata Management<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"18\">Traditionally, plugin metadata\u2014such as descriptions, parameter details, and return value information\u2014is hardcoded or statically defined. This approach creates several challenges:<\/p>\n<ul class=\"code-line\" dir=\"auto\" data-line=\"20\">\n<li class=\"code-line\" dir=\"auto\" data-line=\"20\"><strong>Downtime for Updates<\/strong>: Any change to metadata often requires redeployment, leading to service interruptions.<\/li>\n<li class=\"code-line\" dir=\"auto\" data-line=\"21\"><strong>Limited Customization<\/strong>: Adapting metadata to evolving business needs or user feedback becomes cumbersome.<\/li>\n<li class=\"code-line\" dir=\"auto\" data-line=\"22\"><strong>Rigid Architecture<\/strong>: Static metadata lacks the flexibility to support dynamic use cases or future expansions.<\/li>\n<\/ul>\n<h3 id=\"2-inconsistent-user-experience\" class=\"code-line\" dir=\"auto\" data-line=\"24\">2.\u00a0<strong>Inconsistent User Experience<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"26\">When metadata cannot be updated dynamically, it may lead to outdated or irrelevant descriptions, confusing users and reducing the overall effectiveness of the plugins.<\/p>\n<h3 id=\"3-complex-maintenance\" class=\"code-line\" dir=\"auto\" data-line=\"28\">3.\u00a0<strong>Complex Maintenance<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"30\">Managing metadata across multiple plugins and ensuring consistency can become a maintenance challenge, especially in large-scale systems.<\/p>\n<h3 id=\"4-challenges-with-openapi-specifications\" class=\"code-line\" dir=\"auto\" data-line=\"32\">4.\u00a0<strong>Challenges with OpenAPI Specifications<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"34\">When using an OpenAPI specification for plugins, additional challenges arise:<\/p>\n<ul class=\"code-line\" dir=\"auto\" data-line=\"36\">\n<li class=\"code-line\" dir=\"auto\" data-line=\"36\"><strong>Lack of Control<\/strong>: Often, developers do not have control over the API to update descriptions and make them friendly for large language models (LLMs).<\/li>\n<li class=\"code-line\" dir=\"auto\" data-line=\"37\"><strong>Change Management Overhead<\/strong>: Even if control exists, applying changes may require a significant change management process.<\/li>\n<li class=\"code-line\" dir=\"auto\" data-line=\"38\"><strong>Balancing Human and LLM Needs<\/strong>: Descriptions must be crafted to be equally understandable by humans and LLMs, which can be a complex task.<\/li>\n<li class=\"code-line\" dir=\"auto\" data-line=\"39\"><strong>Local Copy Maintenance<\/strong>: Keeping a local copy of the OpenAPI spec to make adjustments is another option, but it is not ideal as it introduces redundancy and potential inconsistencies.<\/li>\n<\/ul>\n<h3 id=\"5-wrapper-classes-for-sdks\" class=\"code-line\" dir=\"auto\" data-line=\"41\">5.\u00a0<strong>Wrapper Classes for SDKs<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"43\">For existing classes, such as those from an SDK like a home automation library, developers often need to wrap the class in a custom class and then decorate it using attributes in the wrapper. This process adds unnecessary complexity and overhead, making it harder to integrate such classes into the plugin ecosystem.<\/p>\n<h2 id=\"enter-semanticpluginforge\" class=\"code-line\" dir=\"auto\" data-line=\"45\">Enter SemanticPluginForge<\/h2>\n<p class=\"code-line\" dir=\"auto\" data-line=\"47\">SemanticPluginForge is designed to address these pain points by introducing a dynamic and extensible approach to plugin metadata management. Here\u2019s how it can help:<\/p>\n<h3 id=\"1-dynamic-metadata-updates\" class=\"code-line\" dir=\"auto\" data-line=\"49\"><strong>1. Dynamic Metadata Updates<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"51\">With SemanticPluginForge, you can make real-time updates to plugin metadata without redeploying your application. This ensures:<\/p>\n<ul class=\"code-line\" dir=\"auto\" data-line=\"53\">\n<li class=\"code-line\" dir=\"auto\" data-line=\"53\"><strong>Zero Downtime<\/strong>: Update descriptions, parameters, and return values seamlessly.<\/li>\n<li class=\"code-line\" dir=\"auto\" data-line=\"54\"><strong>Enhanced Flexibility<\/strong>: Quickly adapt to changing requirements or user feedback.<\/li>\n<\/ul>\n<h3 id=\"2-extensible-architecture\" class=\"code-line\" dir=\"auto\" data-line=\"56\"><strong>2. Extensible Architecture<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"58\">The library provides an interface,\u00a0<code>IPluginMetadataProvider<\/code>, that allows developers to implement custom metadata providers. For example:<\/p>\n<ul class=\"code-line\" dir=\"auto\" data-line=\"60\">\n<li class=\"code-line\" dir=\"auto\" data-line=\"60\">Fetch metadata from a database or remote service.<\/li>\n<li class=\"code-line\" dir=\"auto\" data-line=\"61\">Customize metadata based on specific business logic.<\/li>\n<\/ul>\n<h3 id=\"3-suppressing-functions-and-parameters\" class=\"code-line\" dir=\"auto\" data-line=\"63\"><strong>3. Suppressing Functions and Parameters<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"65\">SemanticPluginForge introduces the ability to suppress specific functions or parameters in plugin metadata. This feature is particularly useful for:<\/p>\n<ul class=\"code-line\" dir=\"auto\" data-line=\"67\">\n<li class=\"code-line\" dir=\"auto\" data-line=\"67\">Hiding sensitive or irrelevant details from end-users.<\/li>\n<li class=\"code-line\" dir=\"auto\" data-line=\"68\">Maintaining functionality while controlling visibility.<\/li>\n<\/ul>\n<h3 id=\"4-improved-user-experience\" class=\"code-line\" dir=\"auto\" data-line=\"70\"><strong>4. Improved User Experience<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"72\">By dynamically tuning plugin metadata, you can ensure that users always have access to accurate and relevant information, leading to a more intuitive and effective experience.<\/p>\n<h3 id=\"5-simplified-maintenance\" class=\"code-line\" dir=\"auto\" data-line=\"74\"><strong>5. Simplified Maintenance<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"76\">Centralized and dynamic metadata management reduces the complexity of maintaining consistency across plugins, saving time and effort.<\/p>\n<h3 id=\"6-future-proof-design\" class=\"code-line\" dir=\"auto\" data-line=\"78\"><strong>6. Future-Proof Design<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"80\">SemanticPluginForge is built with scalability in mind, ensuring that it can handle the growing demands of modern applications. Its modular design allows for seamless integration with new technologies and frameworks.<\/p>\n<h3 id=\"7-simplified-integration-for-existing-classes\" class=\"code-line\" dir=\"auto\" data-line=\"82\"><strong>7. Simplified Integration for Existing Classes<\/strong><\/h3>\n<p class=\"code-line\" dir=\"auto\" data-line=\"84\">With SemanticPluginForge, you can create a plugin out of any class or object without the need for wrapping it in a custom class or decorating it with attributes. Instead, you only need to provide the necessary metadata, enabling seamless integration and allowing these classes to be leveraged effectively in your agents.<\/p>\n<h2 id=\"how-to-get-started\" class=\"code-line\" dir=\"auto\" data-line=\"86\">How to Get Started<\/h2>\n<p class=\"code-line\" dir=\"auto\" data-line=\"88\">Using SemanticPluginForge is straightforward. Here\u2019s a quick overview:<\/p>\n<ol class=\"code-line\" dir=\"auto\" data-line=\"90\">\n<li class=\"code-line\" dir=\"auto\" data-line=\"90\">\n<p class=\"code-line\" dir=\"auto\" data-line=\"90\"><strong>Download the Package<\/strong>: Install the SemanticPluginForge package via NuGet using the following command:<\/p>\n<pre><code class=\"code-line language-bash\" dir=\"auto\" data-line=\"93\">dotnet add package SemanticPluginForge.Core\r\n<\/code><\/pre>\n<\/li>\n<li class=\"code-line\" dir=\"auto\" data-line=\"97\">\n<p class=\"code-line\" dir=\"auto\" data-line=\"97\"><strong>Implement a Custom Metadata Provider<\/strong>: Define your own logic for updating metadata dynamically by implementing the\u00a0<code>IPluginMetadataProvider<\/code>\u00a0interface.<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"code-line language-csharp\" dir=\"auto\" data-line=\"100\"><span class=\"hljs-keyword\">public<\/span> <span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-title\">SampleMetadataProvider<\/span> : <span class=\"hljs-title\">IPluginMetadataProvider<\/span>\r\n{\r\n    <span class=\"hljs-keyword\">public<\/span> FunctionMetadata? GetFunctionMetadata(KernelPlugin plugin, KernelFunctionMetadata metadata) =&gt;\r\n        plugin.Name <span class=\"hljs-keyword\">switch<\/span>\r\n        {\r\n            <span class=\"hljs-string\">\"WeatherPlugin\"<\/span> =&gt; metadata.Name == <span class=\"hljs-string\">\"GetTemperatureByCity\"<\/span> ? <span class=\"hljs-keyword\">new<\/span> FunctionMetadata(metadata.Name)\r\n            {\r\n                Description = metadata.Description,\r\n                Parameters = [\r\n                    <span class=\"hljs-keyword\">new<\/span> ParameterMetadata(<span class=\"hljs-string\">\"name\"<\/span>)\r\n                    {\r\n                        Description = <span class=\"hljs-string\">\"The name of the city should be retrieved from the user context, if not in context, please ask the user.\"<\/span>,\r\n                        IsRequired = <span class=\"hljs-literal\">true<\/span>,\r\n                    },\r\n                    <span class=\"hljs-keyword\">new<\/span> ParameterMetadata(<span class=\"hljs-string\">\"unit\"<\/span>)\r\n                    {\r\n                        Description = <span class=\"hljs-string\">\"This description does not matter as this will always be suppressed and the default will be used.\"<\/span>,\r\n                        IsRequired = <span class=\"hljs-literal\">false<\/span>,\r\n                        Suppress = <span class=\"hljs-literal\">true<\/span>,\r\n                        DefaultValue = <span class=\"hljs-string\">\"celsius\"<\/span>,\r\n                    }\r\n                ],\r\n                ReturnParameter = <span class=\"hljs-keyword\">new<\/span> ReturnParameterMetadata\r\n                {\r\n                    Description = <span class=\"hljs-string\">\"The temperature of the city in the specified unit.\"<\/span>\r\n                },\r\n            }\r\n            : <span class=\"hljs-literal\">null<\/span>,\r\n            <span class=\"hljs-string\">\"ShortDatePlugin\"<\/span> =&gt; metadata.Name == <span class=\"hljs-string\">\"ToShortDateString\"<\/span> ? <span class=\"hljs-keyword\">new<\/span> FunctionMetadata(metadata.Name)\r\n            {\r\n                Description = <span class=\"hljs-string\">\"Returns the date in short format.\"<\/span>\r\n            } : <span class=\"hljs-literal\">null<\/span>,\r\n            _ =&gt; <span class=\"hljs-literal\">null<\/span>,\r\n        };\r\n\r\n    <span class=\"hljs-keyword\">public<\/span> PluginMetadata? GetPluginMetadata(KernelPlugin plugin) =&gt;\r\n        plugin.Name <span class=\"hljs-keyword\">switch<\/span>\r\n        {\r\n            <span class=\"hljs-string\">\"WeatherPlugin\"<\/span> =&gt; <span class=\"hljs-keyword\">new<\/span> PluginMetadata { Description = <span class=\"hljs-string\">\"This plugin can be used to retrieve information about the weather.\"<\/span> },\r\n            <span class=\"hljs-string\">\"ShortDatePlugin\"<\/span> =&gt; <span class=\"hljs-keyword\">new<\/span> PluginMetadata { Description = <span class=\"hljs-string\">\"This plugin returns date and time information.\"<\/span> },\r\n            _ =&gt; <span class=\"hljs-literal\">null<\/span>,\r\n        };\r\n}\r\n<\/code><\/pre>\n<ol class=\"code-line\" dir=\"auto\" start=\"3\" data-line=\"146\">\n<li class=\"code-line code-active-line\" dir=\"auto\" data-line=\"146\"><strong>Register the Metadata Provider<\/strong>: Add your custom provider to the service collection to enable dynamic updates.<\/li>\n<\/ol>\n<pre><code class=\"code-line language-csharp\" dir=\"auto\" data-line=\"149\">services.AddSingleton&lt;IPluginMetadataProvider, CustomMetadataProvider&gt;();\r\n<\/code><\/pre>\n<ol class=\"code-line\" dir=\"auto\" start=\"4\" data-line=\"153\">\n<li class=\"code-line\" dir=\"auto\" data-line=\"153\"><strong>Add Plugins with Patched Metadata<\/strong>: Use the provided extension methods to integrate plugins with updated metadata into your application.<\/li>\n<\/ol>\n<pre><code class=\"code-line language-csharp\" dir=\"auto\" data-line=\"156\">kernel.Plugins.AddFromTypeWithMetadata&lt;WeatherServicePlugin&gt;(<span class=\"hljs-string\">\"WeatherService\"<\/span>);\r\n<\/code><\/pre>\n<ol class=\"code-line\" dir=\"auto\" start=\"5\" data-line=\"160\">\n<li class=\"code-line\" dir=\"auto\" data-line=\"160\"><strong>Add types without KernelFunction attributes defined<\/strong>: Use the provided extension methods to integrate plugins with updated metadata into your application.<\/li>\n<\/ol>\n<pre><code class=\"code-line language-csharp\" dir=\"auto\" data-line=\"163\">kernelBuilder.Plugins.AddFromClrObjectWithMetadata(<span class=\"hljs-keyword\">new<\/span> DateTime(), <span class=\"hljs-string\">\"ShortDatePlugin\"<\/span>);\r\n<\/code><\/pre>\n<p class=\"code-line\" dir=\"auto\" data-line=\"167\">For detailed examples and code snippets, check out the\u00a0<a href=\"https:\/\/github.com\/lsiddiquee\/SemanticPluginForge\/blob\/main\/README.md\" data-href=\"https:\/\/github.com\/lsiddiquee\/SemanticPluginForge\/blob\/main\/README.md\">project\u2019s README<\/a>.<\/p>\n<h2 id=\"join-the-community\" class=\"code-line\" dir=\"auto\" data-line=\"169\">Join the Community<\/h2>\n<p class=\"code-line\" dir=\"auto\" data-line=\"171\">SemanticPluginForge is open-source and welcomes contributions from developers worldwide. Whether you want to report an issue, suggest a feature, or submit a pull request, your input is valuable. Join the discussion on our\u00a0<a href=\"https:\/\/github.com\/lsiddiquee\/SemanticPluginForge\/\" data-href=\"https:\/\/github.com\/lsiddiquee\/SemanticPluginForge\/\">GitHub repository<\/a>\u00a0and help shape the future of dynamic metadata management.<\/p>\n<h2 id=\"conclusion\" class=\"code-line\" dir=\"auto\" data-line=\"173\">Conclusion<\/h2>\n<p class=\"code-line\" dir=\"auto\" data-line=\"175\">SemanticPluginForge helps developers overcome the limitations of static metadata management, offering a dynamic, extensible, and user-friendly solution. By adopting this library, you can enhance the flexibility, maintainability, and overall effectiveness of your plugins.<\/p>\n<p class=\"code-line\" dir=\"auto\" data-line=\"177\">Ready to improve the way you manage plugin metadata? Explore SemanticPluginForge today and take your development to the next level!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the world of software development, flexibility and adaptability are key. Developers often face challenges when it comes to updating plugin metadata dynamically without disrupting services or requiring redeployment. This is where\u00a0SemanticPluginForge, an open-source project, steps in to improve the way we manage plugin metadata. LLM Function Calling Feature The function calling feature in LLMs [&hellip;]<\/p>\n","protected":false},"author":170488,"featured_media":4081,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[117,16],"tags":[],"class_list":["post-4918","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guest-blog","category-tools"],"acf":[],"blog_post_summary":"<p>In the world of software development, flexibility and adaptability are key. Developers often face challenges when it comes to updating plugin metadata dynamically without disrupting services or requiring redeployment. This is where\u00a0SemanticPluginForge, an open-source project, steps in to improve the way we manage plugin metadata. LLM Function Calling Feature The function calling feature in LLMs [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts\/4918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/users\/170488"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/comments?post=4918"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/posts\/4918\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/media\/4081"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/media?parent=4918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/categories?post=4918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/agent-framework\/wp-json\/wp\/v2\/tags?post=4918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}