Tutorials ASP.NET Core with Agentic AI Tutorial
Function Calling — Complete Guide
Function Calling — Complete Guide: free step-by-step lesson with examples, common mistakes, and interview tips — part of ASP.NET Core with Agentic AI Tutorial on Toolliyo Academy.
On this page
ASP.NET Core with Agentic AI Tutorial · Lesson 34 of 100
Function Calling
AI basics → Agents
AI basics · 1 — Setup · ~6 min · Module 4: AI Agents and Multi-Agent Systems
What is this?
Function calling is the OpenAI/Azure API feature exposing JSON schemas of functions the model may call. AgentNest defines schemas from KernelFunction metadata for ERP tool catalogs.
Why should you care?
Explicit JSON schemas let you diff tool surfaces between releases and block deprecated ERP functions at the gateway.
See it live — copy this example
Paste into an ASP.NET Core 8+ / AgentNest project, then run with dotnet run (set your API keys in user-secrets).
// AgentNest.Api/Schemas/GlFunctionSchemaExporter.cs
public static class GlFunctionSchemaExporter
{
public static object Describe(KernelFunction fn) => new
{
name = fn.Name,
description = fn.Description,
parameters = fn.Metadata.Parameters.Select(p => new { p.Name, type = p.ParameterType?.Name })
};
}
What happened?
- Describe projects kernel function metadata into OpenAI-compatible schema shapes for documentation and APIM validation.
- Follow the steps below — typing the code yourself is the fastest way to learn.
Practice next
- Export schemas from GlPlugin functions at startup.
- Publish schemas to internal wiki for finance reviewers.
- Compare schema hashes between releases in CI.
- Add required flags on parameters in exported schema.
- Version schema bundle at GET /api/ai/tools.
Remember
Function schemas describe tools to the model API. Generate schemas from KernelFunction metadata. Keep function sets small per agent for accuracy.
ERP tool catalog
Finance wants sign-off on which GL tools agents may call.
Outcome: Exported schemas give auditors a readable catalog tied to C# source.
Interview prep for this lesson
Practice these questions aloud after reading—each links to a full structured answer.
Sign in to ask a question or upvote helpful answers.
No questions yet — be the first to ask!